docs: add documentation versioning

This commit is contained in:
2026-03-11 15:03:20 -04:00
parent dde5183e68
commit ca8718da3c
5 changed files with 257 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ on:
types: [published]
permissions:
contents: read
contents: write
pages: write
id-token: write
@@ -16,9 +16,14 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/configure-pages@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Install uv
uses: astral-sh/setup-uv@v7
@@ -26,9 +31,22 @@ jobs:
- name: Set up Python
run: uv python install 3.13
- run: uv sync --group dev
- run: uv sync --group docs
- run: uv run zensical build --clean
- name: Install mkdocs shim
run: cp scripts/mkdocs .venv/bin/mkdocs && chmod +x .venv/bin/mkdocs
- name: Deploy docs version
run: |
VERSION="${GITHUB_REF_NAME#v}"
MINOR_VERSION="${VERSION%.*}"
uv run mike deploy --push --update-aliases "$MINOR_VERSION" latest
uv run mike set-default --push latest
- name: Prepare site artifact
run: git worktree add site gh-pages
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v4
with: