docs-2977: add weekly link-check workflow#2840
Merged
Merged
Conversation
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>
✅ Deploy Preview for calico-docs-preview-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview succeeded!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
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.ymlwith a Monday 07:00 UTC schedule plusworkflow_dispatch. - Builds the docs site, installs Playwright Chrome, serves the site, and runs the crawler via
make build+make test, capturing output tolink-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 |
Collaborator
Author
There was a problem hiding this comment.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.workflow_dispatch).make buildthenmake test).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
make buildandmake testtargets. It does not change the crawler or the build.nextdocs (BUILD_NEXTis unset), so it checks released versions only.How to validate
workflow_dispatch) on this branch.LINK-CHECK REPORT.