Updated HW02 #119
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: deploy-book | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| jobs: | |
| deploy-book: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.11 | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| # Debug before build | |
| - name: Check existing files | |
| run: ls -lah || echo "No files found" | |
| - name: Build the book | |
| run: | | |
| set -e # Stop on error | |
| jupyter-book build . | |
| # Debug after build | |
| - name: Check built files | |
| run: ls -lah _build || echo "_build directory missing" | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: "_build/html" | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |