Skip to content

ci(pull-request): add Sphinx linkcheck to catch dead external links#61

Merged
sbaerlocher merged 2 commits into
mainfrom
feat/ci-linkcheck
Jun 15, 2026
Merged

ci(pull-request): add Sphinx linkcheck to catch dead external links#61
sbaerlocher merged 2 commits into
mainfrom
feat/ci-linkcheck

Conversation

@sbaerlocher

Copy link
Copy Markdown
Member

Summary

Adds a Sphinx linkcheck step to the PR workflow so dead external links are caught automatically, instead of being found manually (cf. commit 2e96c60 "remove broken quickstart link").

Internal :ref:/:doc: references are already enforced by the existing nitpicky html build (-W); this adds coverage for external URLs.

Changes

  • conf.py — linkcheck configuration hardened against flaky endpoints: linkcheck_retries=2, linkcheck_timeout=15, linkcheck_workers=5, linkcheck_anchors=False (client-rendered anchors aren't real breakage), and an ignore list for hosts that 403 non-browser clients (galaxy.ansible.com, hub.docker.com).
  • .github/workflows/pull-request.yml — new Check Links step after the build, reusing the rst/ tree build.sh already generated (collections rendered + normalized), so no double build.

Notes

From a triage of the Notion "Repo Ideas" backlog for guide: this was the one clearly-lohnende offene Idee. The other guide ideas were either already done (build.sh versions via versions.env/Renovate, Dockerfile SHA256 pin, local-build docs, Mermaid) or low-ROI (incremental builds, facet search) and were closed/annotated in Notion.

Internal :ref:/:doc: references are already enforced by the nitpicky
html build; add a linkcheck step that reuses the rst/ tree build.sh
generates to validate external URLs. Harden against flaky endpoints
with retries, a timeout, and an ignore list for hosts that 403
non-browser clients (galaxy.ansible.com, hub.docker.com).

Signed-off-by: Simon Bärlocher <s.baerlocher@sbaerlocher.ch>
The new linkcheck step caught genuine broken links:

- compatibility.rst: 'ansible.*/issues' and 'ansible.*/releases.atom'
  used a literal '.*' glob as a URL; rewrite as prose listing the real
  per-collection repositories.
- standards.rst: linked a non-existent STANDARDS.md in arillso/.github
  (404); point at the repository root instead.
- conf.py: ignore the 'tag:' URI scheme that appears in generated
  collection RST (tailscale_role ACL tags), which linkcheck cannot
  resolve and which lives in generated output we do not edit.

Signed-off-by: Simon Bärlocher <s.baerlocher@sbaerlocher.ch>
@sbaerlocher sbaerlocher merged commit d4c6da6 into main Jun 15, 2026
5 of 6 checks passed
@sbaerlocher sbaerlocher deleted the feat/ci-linkcheck branch June 15, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant