Fix static assets deployment: add missing JS files to conf.py and ensure .nojekyll is copied to build output

This commit is contained in:
Vijay Janapa Reddi
2025-11-15 12:00:59 -05:00
parent fbd8a95b34
commit 34542a8140
4 changed files with 25 additions and 1 deletions

View File

@@ -49,6 +49,15 @@ jobs:
working-directory: ./site
run: |
jupyter-book build . --all
# Ensure .nojekyll exists in build output for GitHub Pages
# This prevents Jekyll from processing and ignoring _static/ files
if [ -f .nojekyll ]; then
cp .nojekyll _build/html/.nojekyll
echo "✅ Copied .nojekyll to build output"
else
touch _build/html/.nojekyll
echo "✅ Created .nojekyll in build output"
fi
- name: Deploy to /dev/ subdirectory
uses: peaceiris/actions-gh-pages@v3

View File

@@ -53,12 +53,23 @@ jobs:
cd site
jupyter-book clean . || true
jupyter-book build .
# Ensure .nojekyll exists in build output for GitHub Pages
# This prevents Jekyll from processing and ignoring _static/ files
if [ -f .nojekyll ]; then
cp .nojekyll _build/html/.nojekyll
echo "✅ Copied .nojekyll to build output"
else
touch _build/html/.nojekyll
echo "✅ Created .nojekyll in build output"
fi
echo "=== Contents of site after build ==="
ls -la
echo "=== Contents of _build (if exists) ==="
ls -la _build/ || echo "_build doesn't exist"
echo "=== Contents of _build/html (if exists) ==="
ls -la _build/html/ || echo "_build/html doesn't exist"
echo "=== Verifying .nojekyll exists ==="
ls -la _build/html/.nojekyll || echo "⚠️ .nojekyll missing!"
- name: Deploy main site to gh-pages branch (root)
# Only deploy on main branch pushes (not PRs)

4
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,4 @@
# Minimal pre-commit configuration
# This allows pre-commit to run without errors
repos: []

View File

@@ -14,7 +14,7 @@ external_toc_path = '_toc.yml'
html_baseurl = ''
html_css_files = ['custom.css']
html_favicon = '_static/favicon.svg'
html_js_files = ['wip-banner.js']
html_js_files = ['wip-banner.js', 'ml-timeline.js', 'hero-carousel.js']
html_logo = 'logo-tinytorch-white.png'
html_sourcelink_suffix = ''
html_static_path = ['_static']