deploy-book #453
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: | |
| workflow_run: | |
| workflows: ["Update Metadata"] | |
| types: | |
| - completed | |
| branches: | |
| - main | |
| jobs: | |
| deploy-book: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| permissions: | |
| pages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: '.python-version' | |
| cache: pip | |
| - name: Install dependencies | |
| run: | | |
| pip install -r requirements.txt | |
| - name: Install SPARQL Kernel | |
| run: | | |
| python -m sparqlkernel install --user | |
| jupyter kernelspec list | |
| - name: cache executed notebooks | |
| uses: actions/cache@v3 | |
| with: | |
| path: _build/.jupyter_cache | |
| key: jupyter-book-cache-${{ hashFiles('requirements.txt') }} | |
| - name: Build the book | |
| run: | | |
| jupyter-book build . | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: "_build/html" | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 | |