From a158d5b1b165f965993bdf5d69f1e8274096ff53 Mon Sep 17 00:00:00 2001 From: FuzzyGrim Date: Fri, 15 May 2026 12:40:05 +0200 Subject: [PATCH] add versioned docs deployment --- .github/workflows/build-docs.yml | 14 +++++++++++--- docs/requirements.txt | 1 + mkdocs.yml | 4 ++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index cca948f6..bc1e4b2d 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -2,16 +2,20 @@ name: build-docs on: push: branches: + - dev - release permissions: contents: write +concurrency: + group: docs-deploy + cancel-in-progress: false jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 + with: + fetch-depth: 0 - name: Configure Git Credentials run: | git config user.name github-actions[bot] @@ -27,4 +31,8 @@ jobs: restore-keys: | mkdocs-material- - run: pip install -r docs/requirements.txt - - run: mkdocs gh-deploy --force + - name: Deploy versioned docs + run: mike deploy --push ${{ github.ref_name }} + - name: Set default docs version + if: github.ref_name == 'release' + run: mike set-default --push release diff --git a/docs/requirements.txt b/docs/requirements.txt index 4ef2d8bd..6563c921 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -3,4 +3,5 @@ mkdocs-git-committers-plugin-2==2.5.0 mkdocs-include-markdown-plugin==7.2.2 mkdocs-git-revision-date-localized-plugin==1.5.1 mkdocs-material==9.7.1 +mike==2.1.3 pymdown-extensions==10.20.1 diff --git a/mkdocs.yml b/mkdocs.yml index cf532015..4d4b41a9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -68,6 +68,10 @@ plugins: - git-authors: show_email_address: false extra: + version: + provider: mike + default: release + alias: true social: - icon: fontawesome/brands/github link: https://github.com/FuzzyGrim/Yamtrack