mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2025-12-05 19:17:52 -06:00
Fix static assets deployment: add missing JS files to conf.py and ensure .nojekyll is copied to build output
This commit is contained in:
9
.github/workflows/publish-dev.yml
vendored
9
.github/workflows/publish-dev.yml
vendored
@@ -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
|
||||
|
||||
11
.github/workflows/publish-live.yml
vendored
11
.github/workflows/publish-live.yml
vendored
@@ -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
4
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
# Minimal pre-commit configuration
|
||||
# This allows pre-commit to run without errors
|
||||
repos: []
|
||||
|
||||
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user