fix(ci): download slide decks from release during deployment

Slides were not loading on the live site because the PDFs exist in a
GitHub Release (tinytorch-slides-v0.1.0) but were never downloaded
during the build process. The .gitignore has *.pdf which prevents
slides from being committed to git.

Add a step to both deployment workflows to download all slide PDFs
from the release and inject them into _static/slides/ before deploy.

Fixes harvard-edge/cs249r_book#1162
This commit is contained in:
Vijay Janapa Reddi
2026-02-05 15:42:48 -05:00
parent 0cfebb6f42
commit 852bc5c2fc
2 changed files with 36 additions and 0 deletions

View File

@@ -95,6 +95,24 @@ jobs:
echo "📦 Downloads folder contents:"
ls -la tinytorch/site/_build/html/_static/downloads/ || echo "No downloads folder"
- name: 📊 Download slide decks from release
env:
GH_TOKEN: ${{ github.token }}
run: |
echo "📊 Downloading slide decks from GitHub release..."
mkdir -p tinytorch/site/_build/html/_static/slides
# Download all PDFs from the slides release
gh release download tinytorch-slides-v0.1.0 \
--repo harvard-edge/cs249r_book \
--pattern "*.pdf" \
--dir tinytorch/site/_build/html/_static/slides
echo ""
echo "📦 Slides folder contents:"
ls -la tinytorch/site/_build/html/_static/slides/ || echo "No slides folder"
echo "✅ Downloaded $(ls tinytorch/site/_build/html/_static/slides/*.pdf 2>/dev/null | wc -l) slide decks"
- name: 🚀 Deploy to Dev Site via SSH
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}