Skip to content
Closed
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/broken-link-check.yml
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,
Comment on lines +1 to +4

Copilot AI Jan 29, 2026

Copy link

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 the on key ("on"). Other workflows in this repo use on: unquoted and omit --- (e.g., .github/workflows/validate-rules.yml:1-4). Consider aligning formatting for consistency.

Copilot uses AI. Check for mistakes.
# 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

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

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

repository_dispatch isn’t mentioned in the PR description/checklist (only schedule + manual trigger). If it’s not required, consider removing it to reduce the number of ways this workflow can be triggered; otherwise, document the intended external trigger use-case.

Copilot uses AI. Check for mistakes.
"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

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

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

The workflow configures issue creation via the action (LABELS/TITLE), but the job doesn’t declare token permissions. To make issue creation reliably work across repo/org settings, add an explicit permissions: block (at least issues: write, and contents: read if needed) rather than relying on the repository default GITHUB_TOKEN permissions.

Copilot uses AI. Check for mistakes.
branches: [main, develop]

jobs:
check:
Comment on lines +23 to +24

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

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

For supply-chain hardening, consider pinning the third-party action to a commit SHA instead of a floating major tag (@v2). Using only a major tag allows upstream changes to affect your workflow without review.

Copilot uses AI. Check for mistakes.
name: Check Broken Links
runs-on: ubuntu-latest
Comment on lines +25 to +26

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

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

PR description/checklist says the target should be the repository’s GitHub Pages, but the workflow currently targets the GitHub repo web UI (https://github.com/${{ github.repository }}). Update TARGET to the published Pages URL (typically https://${{ github.repository_owner }}.github.io//) so the check runs against the intended site.

Copilot uses AI. Check for mistakes.

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
Loading