Patch v0.4.1 #39
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: Build and Deploy Documentation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - develop | |
| pull_request: | |
| branches: | |
| - master | |
| - develop | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install documentation dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install sphinx sphinx-rtd-theme sphinx-copybutton sphinx-tabs | |
| - name: Build Sphinx documentation | |
| run: | | |
| cd docs | |
| make html | |
| - name: Upload Pages artifact | |
| if: github.ref == 'refs/heads/master' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/build/html | |
| deploy: | |
| if: github.ref == 'refs/heads/master' | |
| needs: build-docs | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| uses: actions/deploy-pages@v4 |