Skip to content

Link Checker

Link Checker #22

Workflow file for this run

name: Link Checker
on:
workflow_dispatch:
schedule:
# Run daily at 9am
- cron: "00 9 * * *"
push:
branches:
- main
paths:
- "**.md"
- "**.mdx"
- "**.html"
- ".github/workflows/link-check.yml"
merge_group:
pull_request:
branches:
- main
paths:
- "**.md"
- "**.mdx"
- "**.html"
- ".github/workflows/link-check.yml"
jobs:
link-check:
name: Link Check
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@v4
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
with:
args: --config ./.config/lychee.toml './**/*.md' './**/*.mdx' './**/*.html'
- name: Create Issue From File
if: env.lychee_exit_code != 0 && github.event_name == 'schedule'
uses: peter-evans/create-issue-from-file@v5
with:
title: Link Checker Report
content-filepath: ./lychee-report.md
- name: Fail job on error
if: env.lychee_exit_code != 0 && github.event_name != 'schedule'
run: exit 1