name: Publish Documentation on: push: branches: - main - docs-update tags: - '**' permissions: contents: write jobs: publish: runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # zizmor: ignore[artipacked] with: # Necessary to fetch the docs-site branch: fetch-depth: 0 - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 with: # Stay on 3.13 until https://github.com/samuelcolvin/check-python-version/issues/3 is fixed: python-version: '3.13' enable-cache: true # zizmor: ignore[cache-poisoning] -- Job does not produce release artifacts and does not have sensitive permissions - 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/check-python-version@ee87cddb8049d2694cc03badc8569765a05cef00 # v5 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 }} STEPS_CHECK_VERSION_OUTPUTS_VERSION_MAJOR_MINOR: ${{ steps.check-version.outputs.VERSION_MAJOR_MINOR }}