Skip to content

Commit c5eaf0c

Browse files
committed
Add more logging to build file
1 parent 5ee56b5 commit c5eaf0c

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

.github/workflows/deploy-book.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,29 @@ jobs:
5555
# Build the book
5656
- name: Build the book
5757
run: |
58-
jupyter-book build --all .
58+
echo "Starting Jupyter Book build..."
59+
ls -la _build 2>/dev/null || echo "No _build directory yet"
60+
jupyter-book build --all . 2>&1 | tee build.log
61+
# Check if build succeeded
62+
if grep -q "Error reading file" build.log; then
63+
echo "❌ Build error detected in output"
64+
cat build.log
65+
exit 1
66+
fi
67+
# Verify the build actually created the output directory
68+
if [ ! -d "_build/html" ]; then
69+
echo "❌ Error: Build failed to create _build/html directory"
70+
exit 1
71+
fi
72+
if [ ! -f "_build/html/index.html" ]; then
73+
echo "❌ Error: Build did not create index.html"
74+
exit 1
75+
fi
76+
echo "✅ Build successful - _build/html created"
5977
6078
# Upload the book's HTML as an artifact
6179
- name: Upload artifact
80+
if: success()
6281
uses: actions/upload-pages-artifact@v3
6382
with:
6483
path: "_build/html"

0 commit comments

Comments
 (0)