Skip to content

Dev to Master Sync: documented-command linting #8

Dev to Master Sync: documented-command linting

Dev to Master Sync: documented-command linting #8

Workflow file for this run

name: PR Check
# Validates a pull request before it is merged.
#
# Two gates:
# - the site build, which fails on a broken internal link or anchor
# (onBrokenLinks / onBrokenAnchors are 'throw' in docusaurus.config.js)
# - scripts/check_docs_commands.py, which lints every shell command printed
# in the manual and flags command blocks that have drifted between the
# farmers/ and labs/ copies of a page
#
# External links are NOT checked here -- third-party rot must never block a
# merge. Those are covered by the weekly link check instead.
on:
pull_request:
branches: [ development, master ]
jobs:
build:
name: Build site
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Build site
# Fails on broken internal links and anchors.
run: npm run build
- name: Install shellcheck
run: shellcheck --version >/dev/null 2>&1 || sudo apt-get install -y shellcheck
- name: Check documented shell commands
# Lints every shell block in the manual and flags farmers/ vs labs/
# command drift. See the script's docstring for what it skips and why.
run: python3 scripts/check_docs_commands.py