Skip to content

Add link-checker workflow for documentation quality #4

Add link-checker workflow for documentation quality

Add link-checker workflow for documentation quality #4

Workflow file for this run

name: Link Checker
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
link-checker:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Link Checker
uses: lycheeverse/lychee-action@v2.7.0
with:
# Scan all markdown files in the repository
args: >-
--verbose
--no-progress
--exclude '^file://'
--exclude '^mailto:'
--scheme https
--accept 200,201,202,203,204,300,301,302,303,307,308
--timeout 30
--max-retries 3
--retry-wait-time 5
'skills/**/*.md'
'templates/**/*.md'
'README.md'
'CLAUDE.md'
# Fail the build if broken links are found
fail: true
env:
# Use GitHub token to avoid rate limiting
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Output link checker results
if: always()
run: |
echo "📊 Link checker results are available in the workflow"
echo " logs above."
echo ""
echo "To view detailed results:"
echo "1. Go to the 'Actions' tab in the GitHub repository"
echo "2. Select this workflow run"
echo "3. Click on the 'link-checker' job"
echo "4. Expand the 'Link Checker' step to see details"
echo ""
echo "ℹ️ The workflow will fail if any broken links"
echo " (404s, timeouts, etc.) are detected."
echo "ℹ️ Only external HTTPS links are checked."
echo " Local file paths and mailto links are excluded."