Skip to content

Add broken link checker to deploy preview workflow#1331

Open
robbymilo wants to merge 54 commits intomainfrom
robbymilo/deploy-preview
Open

Add broken link checker to deploy preview workflow#1331
robbymilo wants to merge 54 commits intomainfrom
robbymilo/deploy-preview

Conversation

@robbymilo
Copy link
Copy Markdown
Contributor

@robbymilo robbymilo commented Mar 13, 2026

for https://github.com/grafana/website/issues/29598

This PR adds a broken link job to the deploy preview workflow. It refactors the website build step to upload an artifact which is then used simultaneously to deploy the preview and check links.

Unlike our link checker in the website repo, this replaces muffet with standard Golang HTTP requests. The link check process is:

  1. Download the built website artifact.
  2. A Go script walks the dist dir to build a list of pages.
  3. Nginx is configured, tested, and spun up.
  4. Each page of the build is crawled and every link is checked if it hasn't already been checked.
  5. A comment is added to the PR describing the broken links and where they occur (see screenshot). The comment is updated on subsequent runs.
Screenshot From 2026-03-25 14-16-22

Todo:

  • revert broken link test changes
  • support redirects defined in website repo
  • support redirects generated from mounted content, ex ../image-rendering/.
  • support mounted content

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 13, 2026

Readability report

File AutomatedReadability ColemanLiau FleschKincaid FleschReadingEase GunningFog LIX SMOG
docs/sources/review/test-documentation-changes-test/index.md $${7.01\space\color{black}(Δ+0.00)}$$ $${10.27\space\color{black}(Δ+0.00)}$$ $${8.61\space\color{black}(Δ+0.00)}$$ $${52.35\space\color{black}(Δ+0.00)}$$ $${10.56\space\color{black}(Δ+0.00)}$$ $${40.89\space\color{black}(Δ+0.00)}$$ $${11.21\space\color{black}(Δ+0.00)}$$
docs/sources/whats-new.md $${9.69\space\color{black}(Δ+0.00)}$$ $${13.09\space\color{black}(Δ+0.00)}$$ $${9.74\space\color{black}(Δ+0.00)}$$ $${46.61\space\color{black}(Δ+0.00)}$$ $${11.47\space\color{black}(Δ+0.00)}$$ $${70.33\space\color{black}(Δ+0.00)}$$ $${11.21\space\color{black}(Δ+0.00)}$$
View metric targets
Metric Range Ideal score
AutomatedReadability 6 (very easy read) to 14 (extremely difficult read) 8 or less
ColemanLiau 6 (very easy read) to 17 (extremely difficult read) 9 or less
FleschKincaid 6 (very easy read) to 17 (extremely difficult read) 8 or less
FleschReadingEase 100 (very easy read) to 0 (extremely difficult read) 70 or more
GunningFog 6 (very easy read) to 17 (extremely difficult read) 10 or less
LIX 20 (very easy read) to 60+ (extremely difficult read) 35 or less
SMOG 6 (very easy read) to 17 (extremely difficult read) 10 or less

@github-actions

This comment was marked as outdated.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 13, 2026

💻 Deploy preview available (update deploy preview workflow with broken link check):

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 13, 2026

🔗 Broken links report (Add broken link checker to deploy preview workflow): 2 broken links total.

Broken links in files changed in this PR:

File Broken link
docs/sources/whats-new.md:26:55 /docs/test/writers-toolkit/write/shortcodes/

All other broken links:

File Broken link
docs/sources/review/cla-assistant/index.md:13:205 /docs/grafana/latest/developers/cla/

Download the full links report artifact.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

💻 Deploy preview available (Add broken link checker to deploy preview workflow):

@robbymilo robbymilo force-pushed the robbymilo/deploy-preview branch from aac9a5a to 78fb055 Compare March 26, 2026 13:23
@robbymilo robbymilo force-pushed the robbymilo/deploy-preview branch from 1232727 to 0fce8c4 Compare March 26, 2026 13:58
@robbymilo robbymilo force-pushed the robbymilo/deploy-preview branch from 6818db7 to 4f123ec Compare March 26, 2026 15:20
@robbymilo robbymilo force-pushed the robbymilo/deploy-preview branch from f744b29 to 95ab516 Compare April 1, 2026 12:21
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.

2 participants