Files
cmba-bylaws/.github/workflows/ci-docs.yml
Workflow config file is invalid. Please check your config file: yaml: line 13: did not find expected key
2026-02-05 12:44:38 -06:00

56 lines
1.2 KiB
YAML

name: CI - Docs build check
on:
pull_request:
branches-ignore:
- gh-pages
push:
workflow_dispatch:
permissions:
contents: read
env:
MKDOCS_STRICT: ${{ vars.MKDOCS_STRICT:-true }}
MKDOCS_CONFIG: mkdocs/mkdocs.yml
CSPELL_CONFIG: tools/spellcheck/cspell.yml
CSPELL_TARGETS: "docs/**/*.md" README.md
jobs:
build-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Spellcheck
run: |
set -euo pipefail
npx --yes cspell \
--config ${CSPELL_CONFIG \
${CSPELL_TARGETS}
- name: Install build dependencies
run: |
set -euo pipefail
pip install -r mkdocs/requirements.txt
- name: MkDocs build (strict default)
run: |
set -euo pipefail
echo "Strict is set to ${MKDOCS_STRICT}"
FLAGS=()
if [ "${MKDOCS_STRICT}" = "true" ]; then
FLAGS+=(--strict)
fi
MKDOCS_OUTPUT_DIR="${RUNNER_TEMP:-${TMPDIR:-/tmp}}/dist"
mkdocs build "${FLAGS[@]}" -f "${MKDOCS_CONFIG}" -d "${MKDOCS_OUTPUT_DIR}"