Add workflow to combine pull requests #45
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: Documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| docs-check: | |
| uses: ./.github/workflows/docs.yml | |
| deploy-gh-pages: | |
| needs: docs-check | |
| if: ${{ github.event_name == 'push' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Install docs dependencies | |
| run: uv sync --frozen --no-default-groups --group docs | |
| - name: Deploy docs as dev | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| uv run mike deploy --push --update-aliases dev | |
| - name: Deploy versioned docs and update latest | |
| if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
| run: | | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| uv run mike deploy --push --update-aliases "$VERSION" latest | |
| uv run mike set-default --push latest |