fix: permissions for GHA #2
Workflow file for this run
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: Publish Quarto Notebooks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - notebook_output | |
| # Sets permissions for GitHub Pages deployment | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Needed to push to gh-pages | |
| - name: Setup Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| - name: Render notebooks site | |
| run: | | |
| cd notebooks | |
| quarto render | |
| - name: Deploy Quarto notebooks to gh-pages/notebooks | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: notebooks/_site | |
| destination_dir: notebooks | |
| keep_files: true # <-- keeps existing Sphinx docs untouched |