Skip to content

docs-2977: add weekly link-check workflow#2840

Merged
ctauchen merged 2 commits into
tigera:mainfrom
ctauchen:docs-2977-weekly-link-check
Jul 8, 2026
Merged

docs-2977: add weekly link-check workflow#2840
ctauchen merged 2 commits into
tigera:mainfrom
ctauchen:docs-2977-weekly-link-check

Conversation

@ctauchen

@ctauchen ctauchen commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Part of DOCS-2977.

What this does

Add a GitHub Actions workflow, .github/workflows/link-check-weekly.yml, that runs the full link checker on a schedule.

  • Runs every Monday at 07:00 UTC, and on manual trigger (workflow_dispatch).
  • Builds the site, serves it, installs Chrome, and runs the crawler (make build then make test).
  • On failure, opens or updates a GitHub issue titled "Weekly link check failed" with the last 200 lines of the report.
  • Uploads the full log as a run artifact.

Why

The crawler only ran by hand before. Nothing ran it on a schedule. Now broken links show up as a tracked issue once a week.

Notes

  • This workflow does not gate pull requests. A full external crawl is slow and can be flaky, so it should not block merges.
  • It reuses the existing make build and make test targets. It does not change the crawler or the build.
  • It does not build the next docs (BUILD_NEXT is unset), so it checks released versions only.

How to validate

  • Run the workflow by hand from the Actions tab (workflow_dispatch) on this branch.
  • Confirm it builds, serves, and crawls, and that the log shows the LINK-CHECK REPORT.
  • To test the failure path, add a known-dead URL to a page, run it, and confirm the run fails and opens an issue. Remove the URL after.

Add .github/workflows/link-check-weekly.yml. It runs every Monday and on
manual trigger. It builds the site, serves it, and runs the crawler. On
failure it opens or updates a GitHub issue with the report, and uploads the
full log as an artifact. It does not gate pull requests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ctauchen ctauchen requested a review from a team as a code owner July 8, 2026 09:52
Copilot AI review requested due to automatic review settings July 8, 2026 09:52
@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit 1e01960
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/6a4e3081501c5b000815f268
😎 Deploy Preview https://deploy-preview-2840--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview succeeded!

Built without sensitive environment variables

Name Link
🔨 Latest commit 1e01960
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/6a4e3081577d580008df90f4
😎 Deploy Preview https://deploy-preview-2840--tigera.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 71 (🟢 up 5 from production)
Accessibility: 98 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a scheduled GitHub Actions workflow to run the repository’s existing Playwright-based crawler/link checker weekly and surface failures as a tracked GitHub issue, with logs preserved as run artifacts.

Changes:

  • Introduces .github/workflows/link-check-weekly.yml with a Monday 07:00 UTC schedule plus workflow_dispatch.
  • Builds the docs site, installs Playwright Chrome, serves the site, and runs the crawler via make build + make test, capturing output to link-check.log.
  • On failure, uploads logs and opens/updates an issue titled “Weekly link check failed” with the tail of the report.

Comment on lines +75 to +77
NUM=$(gh issue list --repo "$GITHUB_REPOSITORY" --state open \
--search "\"$TITLE\" in:title" --json number --jq '.[0].number')
if [ -n "$NUM" ]; then

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 1e01960. Changed the jq to .[0].number // empty so NUM is empty (not the string "null") when no issue matches, and the create branch runs on the first failure.

Address Copilot review: jq '.[0].number' returns the string 'null' when no open
issue matches, so the script took the comment branch and never created the first
issue. Use '// empty' so NUM is empty and the create branch runs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ctauchen ctauchen merged commit 339cfdc into tigera:main Jul 8, 2026
11 checks passed
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