Skip to content

DC-5259 Added Lychee Link Checker #36

DC-5259 Added Lychee Link Checker

DC-5259 Added Lychee Link Checker #36

Workflow file for this run

name: 🍈 Lychee Link Checker
on: [pull_request]
jobs:
check-links:
name: πŸ”— Check links with Lychee
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Lychee Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
with:
fail: false
output: ../lychee/out.md
args: >
--cache
--quiet
--max-cache-age 6h
--no-progress
--accept 200,201,204,304,403,429
--timeout 20
--max-retries 5
--retry-wait-time 5
--max-concurrency 16
--exclude 'http://localhost.*'
--exclude 'https://localhost.*'
--exclude 'https://dev.mysql.com/.*'
--exclude 'https://www.mysql.com/.*'
--exclude 'https://www.gnu.org/.*'
--exclude 'https://www.cockroachlabs.com/.*'
--exclude '^/.*'
'./**/*.md' './**/*.mdx'
workingDirectory: "content"
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
- name: πŸ“ Comment Broken Links
if: always()
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body-path: lychee/out.md
- name: 🚫 Fail if broken links found
if: steps.lychee.outputs.exit_code != 0
run: exit ${{ steps.lychee.outputs.exit_code }}