Build and deploy docs (uv) #6
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 docs (uv) | |
| on: | |
| release: | |
| types: | |
| - published | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Fetch gh-pages | |
| run: | | |
| git fetch origin gh-pages:gh-pages || true | |
| - name: Configure Git Credentials | |
| run: | | |
| git config user.name github-actions[bot] | |
| git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
| - name: Install uv and set Python version | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: uv pip install -e .[docs] | |
| - name: Deploy docs for release | |
| run: | | |
| RELEASE_TAG=${{ github.event.release.tag_name }} | |
| echo "Deploying docs for release: $RELEASE_TAG" | |
| mike deploy --push --update-aliases $RELEASE_TAG latest | |
| mike set-default --push latest | |
| # - name: Deploy docs | |
| # run: mkdocs gh-deploy --force |