Skip to content

2.1.6

2.1.6 #3

Workflow file for this run

name: Publish docs [release]
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
type: string
description: Docs version
required: true
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Set version variable
run: echo "VERSION=${{ github.event.release.tag_name || github.event.inputs.version }}" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.10.6
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Build Docs Website
run: mike deploy --alias-type copy --update-aliases $VERSION latest
- name: Pin GitHub Codespaces version
run: |
git checkout gh-pages
find "$VERSION" -type f -exec sed -i "s|ref=master|ref=$VERSION|g" {} +
find latest -type f -exec sed -i "s|ref=master|ref=$VERSION|g" {} +
git add .
git status
git commit -m "[automated] Pin GitHub Codespaces link versions"
git push --set-upstream origin gh-pages