Skip to content

ci: build the docs in CI and drop dead doc-validator config - #1189

Draft
dafydd-t wants to merge 1 commit into
mainfrom
dafydd-t/docs-ci
Draft

dafydd-t wants to merge 1 commit into
mainfrom
dafydd-t/docs-ci

Conversation

@dafydd-t

Copy link
Copy Markdown
Contributor

Summary

  • Add a Docs workflow that runs the existing make -C docs test target (Hugo with HUGO_REFLINKSERRORLEVEL=ERROR), path-filtered to docs/**. Nothing built or validated docs/sources in CI before this, so a broken relref was only caught by the website build after merge.
  • Remove the two dead DOC_VALIDATOR_* exports from docs/variables.mk.

Why

docs/variables.mk reads both values out of .github/workflows/test.yml:

export DOC_VALIDATOR_IMAGE := $(shell sed -En 's, *image: "(grafana/doc-validator.*)",\1,p' ".../.github/workflows/test.yml")

That file does not exist in this repo, so sed silently yields nothing and both variables have always been empty. There is also no doc-validator target in docs.mk to consume them, and neither grafana/grafana nor grafana/gcx runs doc-validator per-repo — gcx's variables.mk has no such lines at all. They were copied from a template.

I removed them rather than pointing them at something real: config that looks live and claims parity with a CI job that was never there is worse than no config. Adding actual doc-validator coverage is a separate decision and this PR deliberately doesn't make it — it would be a new gate no sibling repo has, and it should be chosen rather than smuggled in under a cleanup.

docs.mk is upstream-managed by Writers' Toolkit (see its update target), so I haven't touched it.

Verified

make -C docs test passes on main before the change and on this branch after it — 568 pages, no errors — so the new job is green from the start rather than landing red.

One thing to decide: the job is path-filtered, so if you ever make it a required check, a PR touching no docs will show it as skipped. That's fine for an optional check, worth knowing before making it required.

Found while adding the usage-statistics docs page in #1188, which this is independent of.

Nothing built or validated docs/sources in CI, so a broken relref in a docs
page was only caught by the website build after merge. The new workflow runs
the existing `make -C docs test` target, which is Hugo with
HUGO_REFLINKSERRORLEVEL=ERROR, path-filtered to docs changes.

The two DOC_VALIDATOR_* exports in docs/variables.mk read their values out of
.github/workflows/test.yml, which does not exist in this repo, so both have
always been empty. There is also no doc-validator target in docs.mk to consume
them, and no sibling repo runs doc-validator per-repo. They were copied from a
template, so remove them rather than leave config that looks live and asserts
parity with CI that was never there.

Adding real doc-validator coverage is a separate decision, not implied by
deleting config that never worked.
@github-actions github-actions Bot added the cla: yes Contributor License Agreement is signed label Sep 15, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Contributor License Agreement is signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants