From a2b106e3050e6be54dc032a45394aa6d96c0d7e2 Mon Sep 17 00:00:00 2001 From: Vijay Janapa Reddi Date: Sat, 15 Nov 2025 12:00:59 -0500 Subject: [PATCH] Fix static assets deployment: add missing JS files to conf.py and ensure .nojekyll is copied to build output --- .github/workflows/publish-dev.yml | 9 +++++++++ .github/workflows/publish-live.yml | 11 +++++++++++ .pre-commit-config.yaml | 4 ++++ site/conf.py | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/publish-dev.yml b/.github/workflows/publish-dev.yml index 95dbe451..17243dab 100644 --- a/.github/workflows/publish-dev.yml +++ b/.github/workflows/publish-dev.yml @@ -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 diff --git a/.github/workflows/publish-live.yml b/.github/workflows/publish-live.yml index 67b2d8c5..d7068744 100644 --- a/.github/workflows/publish-live.yml +++ b/.github/workflows/publish-live.yml @@ -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) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..1261e08d --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,4 @@ +# Minimal pre-commit configuration +# This allows pre-commit to run without errors +repos: [] + diff --git a/site/conf.py b/site/conf.py index c60a06af..1f8cb86b 100644 --- a/site/conf.py +++ b/site/conf.py @@ -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']