Files
archie/.github/workflows/docs.yml
T
sam 58a5ec9058 fix(ci): stop the docs workflow failing on a missing pip manifest
.github/workflows/docs.yml runs actions/setup-python@v6 with cache: pip. That
option hashes a requirements.txt or pyproject.toml to build the cache key and
fails outright when neither exists:

    ##[error]No file in ... matched to
            [**/requirements.txt or **/pyproject.toml]

This repository is Go and has no Python manifest, so the step failed as the
first step of every run triggered by the workflow's pull_request paths: docs/**
filter. mkdocs build --strict therefore never executed: docs changes were not
being verified, and every docs-touching PR was reported as a build failure. It
only surfaced on #878 because #878 touches docs/architecture/; PRs that do not
touch docs report no checks at all.

Drop cache: pip. The only Python use is a single `pip install mkdocs-material`,
so there is nothing worth caching.
2026-09-19 02:24:37 +10:00

49 lines
1.4 KiB
YAML

name: docs
# Verification only. Deployment happens from the Ansible control node
# (vectislabs.automation docs_site role against nebula), so there is nothing
# for CI to publish. What CI is for here is catching a docs change that will
# not build before it reaches a deploy.
on:
push:
branches: [main]
paths:
- "docs/**"
- "mkdocs.yml"
- ".github/workflows/docs.yml"
pull_request:
paths:
- "docs/**"
- "mkdocs.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
# No `cache: pip` here: this repository is Go and has no
# requirements.txt or pyproject.toml for setup-python to hash. Asking for
# a pip cache makes the step fail outright with "No file ... matched to
# [**/requirements.txt or **/pyproject.toml]", so every docs-touching PR
# failed before `mkdocs build --strict` ever ran -- which also meant the
# strict link/config check silently stopped guarding anything.
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- run: pip install mkdocs-material
# --strict fails on a broken internal link or an unknown config key. A
# docs site that silently ships dead links is worse than one that refuses
# to ship.
- run: mkdocs build --strict