Skip to content

Update Documentation #8

Update Documentation

Update Documentation #8

name: Update Documentation
on:
workflow_dispatch:
inputs:
build_tag:
description: Version tag
type: string
required: true
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.build_tag }}
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Install dependencies
run: pip install mkdocs mkdocs-material mkdocstrings[python] mike
- name: Configure git and gh-pages branch
run: |
git config user.name mike-ci-bot
git config user.email mike-ci-bot@example.com
git fetch origin gh-pages --depth=1
- name: Build and update alias
run: mike deploy --push --update-aliases ${{ github.event.inputs.build_tag }} latest