Skip to content

Links Checker

Links Checker #69

Workflow file for this run

name: Links Checker
on:
## Allow triggering this workflow manually via GitHub CLI/web
workflow_dispatch:
## Run this workflow automatically every week
schedule:
- cron: "0 0 * * *"
jobs:
links-checker:
name: Check links and create automated issue if needed
runs-on: self-hosted
env:
LYCHEE_OUT: ./lychee/links-report
steps:
## Check out code using Git
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Check all links at *.md and doc files
id: lychee
uses: lycheeverse/lychee-action@2b973e86fc7b1f6b36a93795fe2c9c6ae1118621 # v1.10.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
output: ${{ env.LYCHEE_OUT }}
format: markdown
## Do not fail this step on broken links
fail: false
## Allow pages replying with 200 (Ok)in at most 20 seconds
## This checks all md files in the repo
args: >-
--verbose
--accept 200
--timeout 20
--max-concurrency 10
--no-progress
'./**/*.md'
- name: Find the last report issue open
uses: micalevisk/last-issue-action@0d40124cc99ac8601c2516007f0c98ef3d27537b # v2.3.0
id: last-issue
with:
state: open
labels: broken-links
- name: Create or update report
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5.0.1
with:
title: Link checker report
content-filepath: ${{ env.LYCHEE_OUT }}
issue-number: ${{ steps.last-issue.outputs.issue-number }}
labels: broken-links