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 Jupyter Book to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main # or 'master', adjust as needed | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| pip install jupyter-book<2.0 pyyaml | |
| - name: Split notebooks and generate navigation | |
| run: | | |
| python split_notebooks.py --force | |
| - name: Build the book | |
| run: | | |
| jupyter-book build . | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./_build/html |