Build and Deploy Docs Site (for beta) #10
Workflow file for this run
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 Docs Site (for beta) | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Document version e.g. 1.1-beta, 1.2-beta | |
required: true | |
delete: | |
description: Delete this Beta version | |
type: choice | |
required: true | |
default: 'false' | |
options: | |
- true | |
- false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- uses: actions/cache@v2 | |
with: | |
key: ${{ github.ref }} | |
path: .cache | |
- name: Install dependencies | |
run: pip install mkdocs mkdocs-material mkdocs-minify-plugin mike | |
- name: Configure Git user | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
- name: Publish site version (non-stable) | |
if: ${{ inputs.delete == 'false' }} | |
run: | | |
mike deploy --push --update-aliases ${{ inputs.version }} | |
- name: Delete site version | |
if: ${{ inputs.delete == 'true' }} | |
run: | | |
mike delete --push ${{ inputs.version }} |