pipecd icon indicating copy to clipboard operation
pipecd copied to clipboard

ci: add lychee broken link validation CI for docs

Open vanshika2720 opened this issue 6 months ago • 7 comments

What this PR does: Introduces an automated broken link and asset checker CI pipeline for the docs/ directory using Lychee.

  1. GitHub Actions Workflow (.github/workflows/docs-link-checker.yaml):
    • DX-Optimized PR Checking: On pull requests, it uses a secure native git diff compared to origin/master to isolate and scan only modified markdown files. This guarantees developers are not blocked by legacy, historical broken links.
    • Thorough master Audits: On push to master, it executes a full-health check across all active documentation pages (docs/content/**/*.md and docs/README.md).
  2. Lychee Ruleset Configuration (lychee.toml):
    • Configures root_dir = "docs/static" to resolve root-relative paths like /images/... to physical local files.
    • Bypasses local/private URLs and dynamic Hugo page-routing links.
    • Adds resilience to network rate limits and DDoS protectors (e.g. Cloudflare) by treating common false-positive HTTP codes (400, 403, 429) as acceptable.

Why we need it: Manually catching 404 links and broken image assets in documentation is highly error-prone. This CI pipeline:

  • Automatically prevents new broken links from being merged.
  • Provides a fast, frictionless experience for developers (zero-dependency, only processes their specific changed files in PRs).
  • Protects docs quality without introducing pipeline noise.

Does this PR introduce a user-facing change?: No

vanshika2720 avatar May 18 '26 17:05 vanshika2720

@rahulshendre @khanhtc1202 @eeshaanSA

vanshika2720 avatar May 18 '26 17:05 vanshika2720

@Ayushmore1214 Yeah, I saw that one, but it looked stale so I opened this instead.

vanshika2720 avatar May 20 '26 08:05 vanshika2720

Hi @vanshika2720 thanks for putting this together your approach with the PR diff scanning looks really interesting I've been actively working on #6570 for this issue, but I understand why it might have seemed inactive if there haven't been recent commits and @Ayushmore1214 thanks for the ping I will absolutely join the community meet tomorrow so we can compare the approaches and figure out the best solution for PipeCD See you both there :)

zyzzmohit avatar May 20 '26 17:05 zyzzmohit

@Ayushmore1214 Yeah, I saw that one, but it looked stale so I opened this instead.

You might have asked the owner of the PR if the PR is still active or not, but no worries keep in mind from next time

Ayushmore1214 avatar May 20 '26 18:05 Ayushmore1214

Hi @vanshika2720 thanks for putting this together your approach with the PR diff scanning looks really interesting I've been actively working on #6570 for this issue, but I understand why it might have seemed inactive if there haven't been recent commits and @Ayushmore1214 thanks for the ping I will absolutely join the community meet tomorrow so we can compare the approaches and figure out the best solution for PipeCD See you both there :)

Hi @zyzzmohit FYI the meet was today not tomorrow, no worries you can discuss the intent here

Ayushmore1214 avatar May 20 '26 18:05 Ayushmore1214

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jun 20 '26 00:06 github-actions[bot]

@rahulshendre @mohammedfirdouss PTAL!!

vanshika2720 avatar Jul 09 '26 18:07 vanshika2720