ci: add a markdown link + badge checker for README and docs/#18
Merged
Conversation
The README and docs/ carry many links, shields.io badges, and raw-GitHub asset URLs. Dead links and dead badges are a common rot in public repos and there was no guard, so a moved file or renamed asset would silently 404 for visitors. Add a links workflow that runs lychee over README.md and docs/**/*.md: - Triggers on PRs that touch a *.md file (plus the checker's own config) and on a weekly cron, with workflow_dispatch for manual runs. - Hard 404s fail the job. Flaky or non-fetchable hosts are tolerated via .lycheeignore: localhost examples, shields.io / hub.docker.com / star-history badge hosts, and the interactive "ask an assistant" deep links (chatgpt.com / claude.ai / gemini.google.com) that block bots. Real content links (github.com, raw.githubusercontent.com, npm, pypi, the detector sites) stay checked. - Uses GITHUB_TOKEN so the many github.com links don't hit the anonymous API rate limit. Document the workflow and the .lycheeignore escape hatch in CONTRIBUTING.md. Closes tiliondev#13
The first run failed only on https://www.npmjs.com/package/tilion-fortress, which npm's registry returns 403 Forbidden to for non-browser clients as bot protection — the package page is not fetchable from CI. Add npmjs.com to .lycheeignore, the same tolerance already applied to the badge hosts. PyPI serves crawlers fine and stays checked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The README and
docs/carry many links, shields.io badges, and raw-GitHub asset URLs (banner, release/checksum references). Dead links and dead badges are a common rot in public repos, and there was no guard — a moved file or renamed asset silently 404s for visitors. This adds a low-maintenance CI guard.What it does
A new
linksworkflow (.github/workflows/links.yml) runs lychee overREADME.mdanddocs/**/*.md:*.mdfile (or the checker's own config), a weekly cron (Mondays 06:00 UTC) to catch external rot between PRs, andworkflow_dispatchfor manual runs..lycheeignorerather than left red.GITHUB_TOKENso the manygithub.comlinks use the authenticated (higher) API rate limit..lycheeignoreScoped to genuinely-flaky or non-fetchable endpoints; real content links stay checked:
localhost/127.0.0.1img.shields.io,hub.docker.com,star-history.comnpmjs.comchatgpt.com,claude.ai,gemini.google.comStill checked:
github.com,raw.githubusercontent.com,pypi.org, and the detector sites — so a moved file or renamed release asset is caught.Docs
CONTRIBUTING.mdnow documents the workflow and the.lycheeignoreescape hatch.Verification
links.ymlis valid YAML.README.md/docs/resolves to a real file (AGENTS.md,LICENSE,NOTICE,CHROMIUM_VERSION,docs/GAUNTLET_RESULTS.md, …)..lycheeignore; the re-run is green.*.mdfile — the job fails on the 404.Closes #13