Skip to content

ci: add lychee broken link validation CI for docs - #6789

Open
vanshika2720 wants to merge 4 commits into
pipe-cd:masterfrom
vanshika2720:add-lychee-docs-ci
Open

ci: add lychee broken link validation CI for docs#6789
vanshika2720 wants to merge 4 commits into
pipe-cd:masterfrom
vanshika2720:add-lychee-docs-ci

Conversation

@vanshika2720

@vanshika2720 vanshika2720 commented May 18, 2026

Copy link
Copy Markdown
Contributor

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
vanshika2720 requested a review from a team as a code owner May 18, 2026 17:07
Signed-off-by: Vanshika <pahalvanshikaa@gmail.com>
@vanshika2720

Copy link
Copy Markdown
Contributor Author

@Ayushmore1214 Ayushmore1214 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vanshika2720 there is already a assignee on this specific idea and a PR has been already raised by @zyzzmohit #6570 no worries at all this is your first time here, mistake often happens, lets do one thing you can join tomorrow's community meet along with @zyzzmohit we can discuss which option works better, see you in the meet tomorrow :)

@vanshika2720

Copy link
Copy Markdown
Contributor Author

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

@zyzzmohit

Copy link
Copy Markdown
Contributor

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 :)

@Ayushmore1214

Copy link
Copy Markdown
Member

@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

Copy link
Copy Markdown
Member

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

@github-actions

Copy link
Copy Markdown
Contributor

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 github-actions Bot added Stale and removed Stale labels Jun 20, 2026
@vanshika2720

Copy link
Copy Markdown
Contributor Author

@rahulshendre @mohammedfirdouss PTAL!!

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 25.92%. Comparing base (6cc2b17) to head (29432ab).
⚠️ Report is 57 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6789      +/-   ##
==========================================
- Coverage   29.35%   25.92%   -3.43%     
==========================================
  Files         601      468     -133     
  Lines       64317    51726   -12591     
==========================================
- Hits        18880    13410    -5470     
+ Misses      43968    37217    -6751     
+ Partials     1469     1099     -370     
Flag Coverage Δ
. 23.12% <ø> (ø)
.-pkg-app-pipedv1-plugin-analysis ?
.-pkg-app-pipedv1-plugin-ecs ?
.-pkg-app-pipedv1-plugin-kubernetes 58.37% <ø> (ø)
.-pkg-app-pipedv1-plugin-kubernetes_multicluster ?
.-pkg-app-pipedv1-plugin-scriptrun ?
.-pkg-app-pipedv1-plugin-terraform ?
.-pkg-app-pipedv1-plugin-wait ?
.-pkg-app-pipedv1-plugin-waitapproval ?
.-pkg-plugin-sdk ?
.-tool-actions-gh-release ?
.-tool-actions-plan-preview ?
.-tool-codegen-protoc-gen-auth ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants