Build Documentation and Push to gh-pages Branch #60
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
| # This pipeline | |
| # - builds developer documentation | |
| # - pushes documentation to gh-pages branch of the same repository | |
| # | |
| # Deployment is handled by pages-build-deployment bot | |
| # | |
| # For more information see: https://docs.github.com/en/pages/getting-started-with-github-pages | |
| name: Build Documentation and Push to gh-pages Branch | |
| # Controls when the workflow will run | |
| on: | |
| # Triggers the workflow on tag creation | |
| push: | |
| tags: | |
| - 'v*' | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| # This workflow contains a single job called "build" | |
| build_documentation: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| # Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
| permissions: | |
| contents: read # to clone the repository | |
| pages: write # to deploy to Pages | |
| id-token: write # to verify the deployment originates from an appropriate source | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@master | |
| with: | |
| fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
| - name: Upgrade pip | |
| run: | | |
| python -m pip install --upgrade pip | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| - name: Install Pandoc, repo and dependencies | |
| run: | | |
| sudo apt install pandoc | |
| sudo apt install libcairo2-dev | |
| pip install sphinx==8.1.3 | |
| pip install . '.[dev,docs]' | |
| - name: Install Jupyter kernel | |
| run: | | |
| python -m ipykernel install --user --name=python3 | |
| - name: Build and Commit | |
| uses: sphinx-notes/pages@v3 | |
| with: | |
| sphinx_version: 8.1.3 | |
| documentation_path: docs/src | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| continue-on-error: true | |
| with: | |
| branch: gh-pages |