Update Documentation #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |