Skip to content

0.50.1

0.50.1 #286

Workflow file for this run

# https://squidfunk.github.io/mkdocs-material/publishing-your-site/#with-github-actions
name: Publish documentation
on:
release:
types: [released]
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: refs/tags/${{ github.event.release.tag_name }}
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v6
with:
python-version: "3.10"
- run: echo "cache_id=$(date --utc '+%V')" >> "$GITHUB_ENV"
- uses: actions/cache@v5
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: mkdocs-material-
- run: pip install mkdocs-material
- name: Check if this is the latest release
id: latest
env:
GH_TOKEN: ${{ github.token }}
run: |
LATEST_TAG=$(gh release view --json tagName -q .tagName)
if [ "$LATEST_TAG" = "${{ github.event.release.tag_name }}" ]; then
echo "is_latest=true" >> "$GITHUB_OUTPUT"
else
echo "is_latest=false" >> "$GITHUB_OUTPUT"
fi
- run: mkdocs gh-deploy --force --strict
if: steps.latest.outputs.is_latest == 'true'