Skip to content

Build and Deploy Docs Site (for beta) #4

Build and Deploy Docs Site (for beta)

Build and Deploy Docs Site (for beta) #4

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
promote_to_stable:
description: Promote this Beta version to Stable one
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
run: |
mike deploy --push --update-aliases ${{ inputs.version }}
- name: Promote site to Stable
if: ${{ (inputs.promote_to_stable == 'true)' && contains(inputs.version, '-beta') }}

Check failure on line 46 in .github/workflows/publish-docs-beta.yml

View workflow run for this annotation

GitHub Actions / Build and Deploy Docs Site (for beta)

Invalid workflow file

The workflow is not valid. .github/workflows/publish-docs-beta.yml (Line: 46, Col: 13): Unexpected end of expression: ')'. Located at position 73 within expression: (inputs.promote_to_stable == 'true)' && contains(inputs.version, '-beta') .github/workflows/publish-docs-beta.yml (Line: 47, Col: 14): Unrecognized named-value: 'stable_version'. Located at position 1 within expression: stable_version
run: |
# mike delete --push ${{ inputs.version }}
stable_version="${ inputs.version//-beta }"
echo ${{ stable_version }}
# mike deploy --push --update-aliases ${{ stable_version }} latest