-
Notifications
You must be signed in to change notification settings - Fork 0
Add automated broken link checker workflow #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
ea84be8
f24dea2
cc6629c
121691b
e275c36
5f73c36
3327d41
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| --- | ||
| # Note: The original broken-link-checker-action | ||
| # (technote-space/broken-link-checker-action) was archived in Nov 2022 | ||
| # and is no longer maintained. This workflow uses lychee-action, | ||
| # a well-maintained alternative that provides similar functionality | ||
| # with better performance. If you specifically need the original action, | ||
| # you can switch back to: uses: technote-space/broken-link-checker-action@v2 | ||
|
|
||
| name: Broken Link Check | ||
|
|
||
|
Comment on lines
+8
to
+10
|
||
| "on": | ||
| schedule: | ||
| # Run monthly on the 1st at midnight UTC | ||
| - cron: '0 0 1 * *' | ||
| workflow_dispatch: # Allow manual triggering | ||
| pull_request: | ||
|
Comment on lines
+12
to
+16
|
||
| branches: [main, develop] | ||
|
|
||
| jobs: | ||
| check: | ||
|
Comment on lines
+23
to
+24
|
||
| name: Check Broken Links | ||
| runs-on: ubuntu-latest | ||
|
Comment on lines
+25
to
+26
|
||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Check links with lychee | ||
| uses: lycheeverse/lychee-action@v2 | ||
| with: | ||
| # Check all markdown files in repository | ||
| args: --verbose --no-progress './**/*.md' | ||
| # Fail action on broken links | ||
| fail: true | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Create Issue From File | ||
| if: failure() | ||
| uses: peter-evans/create-issue-from-file@v5 | ||
| with: | ||
| title: Broken Links Detected | ||
| content-filepath: ./lychee/out.md | ||
| labels: | | ||
| bug | ||
| documentation | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow starts with a YAML document marker (
---) and quotes theonkey ("on"). Other workflows in this repo useon:unquoted and omit---(e.g., .github/workflows/validate-rules.yml:1-4). Consider aligning formatting for consistency.