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: 📖 Build & Deploy Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| - 'yep/**' | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Full clone on main/dev so we get version history for documentation | |
| - name: Checkout full history on main/dev | |
| if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # Shallow clone (single commit) on all other branches for debugging | |
| - name: Checkout shallow on other branches | |
| if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python Environment | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ".[docs]" | |
| - name: Build HTML docs | |
| working-directory: docs | |
| run: make html | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs/build/html | |
| publish_branch: gh-pages | |