ci(docs): Add link checker to existing CI to prevent broken docs links
Add a lightweight link-checking step to the existing CI workflow that runs only when docs or README files change. This would fail PRs if there are broken external links, helping catch issues early and reducing manual review overhead for maintainers.
What would you like to be added:
Why is this needed:
@eeshaanSA Thoughts ?
Hi, I completely agree that this would be a great addition to the CI pipeline to catch rotted links early. I would love to work on this!
As a quick investigation, I propose adding a new job to the GitHub Actions workflows using a lightweight action like lychee-action or markdown-link-check. We can configure it to run only on pull_request events where paths match docs/** or **/*.md, and we can set it up to allow certain ignore rules to prevent false positives from flaky external sites.
Maintainers, if you are happy with this feature addition, please assign this to me and I will get a PR up within a few days!
That sounds great @Ayushmore1214 👍 Also looks like @zyzzmohit want to work on that, is that okay to you? @Ayushmore1214
Yeah completely fine @khanhtc1202 , You can assign it to @zyzzmohit
Hi @Ayushmore1214 and @khanhtc1202, I've just opened PR #6570 to address this
I added a new lightweight job using the lycheeverse/lychee-action configured to run selectively on changes to docs/** and **/*.md. To prevent false positives from rate-limiting and anti-bot protections, I've also included a customized .lychee.toml configuration that gracefully ignores localhost, private repository references, and Hugo's internal relative routing paths.
The action itself is securely pinned to a specific SHA (8646ba30) according to the project's security conventions.
Please let me know if any further tweaks to the ignore configurations are needed. Thank you for assigning the issue to me :)
hello @Ayushmore1214, can you please assign me this issue, I love to work on it
hello @Ayushmore1214, I’m really sorry, i am currently unable to work on this issue due to urgent college commitments, i will try to get back to this issue as soon as possible, if it remain unresolved. I am really apologetic for the delay caused in resolving it.
Hi maintainers! I noticed that PR #6570 was closed without being merged, and I couldn't find an existing Lychee link-checking setup in the current master branch. I'd be interested in implementing this issue if it's still needed. Would you be open to a fresh PR?