Prepare release 0.2.0 (#25) #12
Workflow file for this run
This file contains 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: Publish Documentation | |
on: | |
push: | |
branches: | |
- main | |
- docs-update | |
tags: | |
- '**' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Necessary to fetch the docs-site branch: | |
fetch-depth: 0 | |
- uses: astral-sh/setup-uv@v5 | |
with: | |
python-version: '3.13' | |
- run: uv sync --group docs | |
- name: Set git credentials | |
run: | | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
- run: uv run mike deploy -b docs-site dev --push | |
if: github.ref == 'refs/heads/main' | |
- if: startsWith(github.ref, 'refs/tags/') | |
id: check-version | |
uses: samuelcolvin/[email protected] | |
with: | |
version_file_path: pyproject.toml | |
skip_env_check: true | |
- run: uv run mike deploy -b docs-site ${{ steps.check-version.outputs.VERSION_MAJOR_MINOR }} latest --update-aliases --push | |
if: (startsWith(github.ref, 'refs/tags/')) && !fromJSON(steps.check-version.outputs.IS_PRERELEASE) | |
env: | |
PYDANTIC_VERSION: v${{ steps.check-version.outputs.VERSION }} |