Skip to content

Check Links

Check Links #8

Workflow file for this run

name: Check Links
on:
schedule:
# Runs weekly on Monday at 08:00 UTC
- cron: '0 8 * * 1'
workflow_dispatch:
pull_request:
paths:
- '**/index.html'
jobs:
check-links:
runs-on: ubuntu-latest
name: Check index.html files for broken links
steps:
- uses: actions/checkout@v4
- name: Collect index.html files
id: files
run: |
FILES=$(find . -name "index.html" \
-not -path "./.git/*" \
-not -path "*/wwwroot/index.html" \
| sort | tr '\n' ' ')
echo "files=$FILES" >> "$GITHUB_OUTPUT"
- name: Check links with lychee
uses: lycheeverse/lychee-action@v2
with:
args: |
--verbose
--no-progress
--timeout 30
--max-retries 3
--accept 200,206,429
--root-dir .
${{ steps.files.outputs.files }}
fail: true