Fix rate limiting edge cases #48
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: Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - docs | |
| pull_request: | |
| branches: | |
| - main | |
| # Add permissions for deploying to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' # Should match .readthedocs.yaml | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements/docs.txt | |
| pip install . | |
| - name: Build Sphinx documentation | |
| run: | | |
| sphinx-build -b html docs docs/_build/html -W --keep-going | |
| # -W turns warnings into errors | |
| # --keep-going ensures all errors are reported | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # Upload entire directory | |
| path: './docs/_build/html' | |
| # Separate job for deployment | |
| deploy-docs: | |
| needs: build-docs | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| # Only deploy on pushes to the main branch | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |