Skip to content

deploy-docs

deploy-docs #13

Workflow file for this run

# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
name: deploy-docs
on:
workflow_dispatch: {}
workflow_run:
workflows:
- release
types:
- completed
workflow_call:
inputs:
version:
required: false
type: string
description: Version to build and publish docs
alias:
required: false
type: string
description: Alias to associate version (latest, stage)
jobs:
deploy-docs:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
outputs:
getVersion: ${{ steps.getVersion.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- run: echo "cache_id=$(date --utc "+%V")" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
- name: Install doc generations dependencies
run: |-
pip install --upgrade pip
pip install -r docs/requirements.txt
pip install mkdocs-material
pip install mike
- name: Setup docs deploy
run: |-
git config user.name github-actions
git config user.email github-actions@github.com
- name: Get the version
id: getVersion
run: |-
echo "version=$(git describe --tags --abbrev=0)"
echo "version=$(git describe --tags --abbrev=0)" >> "$GITHUB_OUTPUT"
- name: Build and deploy documentation
env:
ALIAS: latest
VERSION: ${{ steps.getVersion.outputs.version }}
run: |-
echo ${{ env.VERSION }}
mike deploy --push --update-aliases ${{ env.VERSION }} ${{ env.ALIAS }}
mike set-default --push ${{ env.ALIAS }}