From 873d1885a659036da1d9f7b72e440141192a67f7 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Tue, 16 Jun 2026 20:09:32 +0300 Subject: [PATCH] ci: deploy docs via GitHub Actions Pages (drop gh-pages branch) Replace mkdocs gh-deploy --force (gh-pages branch) with build artifact + actions/deploy-pages, matching the org site. Add the docs-build recipe used by CI. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/docs.yml | 30 +++++++++++++++++++++--------- Justfile | 7 +++---- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1a84455..b03336e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,20 +9,32 @@ on: - ".github/workflows/docs.yml" workflow_dispatch: -concurrency: - group: docs-deploy - cancel-in-progress: true - permissions: - contents: write + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false jobs: - deploy: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - with: - fetch-depth: 0 - uses: extractions/setup-just@v4 - uses: astral-sh/setup-uv@v8.2.0 - - run: just docs-deploy + - run: just docs-build + - uses: actions/upload-pages-artifact@v5 + with: + path: site + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v5 diff --git a/Justfile b/Justfile index 7d9310e..27cbb18 100644 --- a/Justfile +++ b/Justfile @@ -30,7 +30,6 @@ publish: uv build uv publish --token $PYPI_TOKEN -# Force-pushes built site to gh-pages; CI runs this on push to main. -# Manual invocation from a stale checkout will roll the live site back. -docs-deploy: - uvx --with-requirements docs/requirements.txt mkdocs gh-deploy --force +# Build the docs site, failing on broken links / nav warnings; CI runs this on every PR. +docs-build: + uvx --with-requirements docs/requirements.txt mkdocs build --strict