add versioned docs deployment

This commit is contained in:
FuzzyGrim
2026-05-15 12:40:05 +02:00
parent 3105332c28
commit a158d5b1b1
3 changed files with 16 additions and 3 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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