Build and Deploy Docs Site #30
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: Build and Deploy MkDocs Site | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Document version e.g. 1.1, 1.2 | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v2 | |
with: | |
key: ${{ github.ref }} | |
path: .cache | |
- name: Install dependencies | |
run: pip install mkdocs mkdocs-material mkdocs-minify-plugin mike | |
- name: Publish site | |
run: | | |
cp -f README.md docs/index.md | |
cp -f LICENSE docs/license.md | |
cp -f CONTRIBUTING.md docs/nav/development/contributing-guide.md | |
mike deploy --push --update-aliases ${{ inputs.version }} latest |