Skip to content

Broken link check

Broken link check #76

---
name: Broken link check
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Generate token
uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: "${{ secrets.BOT_APP_ID }}"
private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
token: "${{ steps.generate-token.outputs.token }}"
- name: Scan for broken links
uses: lycheeverse/lychee-action@v1
id: lychee
env:
GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}"
with:
args: --verbose --no-progress --exclude-mail './**/*.md'
- name: Find link checker issue
id: broken-link-check-issue
uses: micalevisk/last-issue-action@v2
with:
state: open
labels: |
broken-links
- name: Update issue
uses: peter-evans/create-issue-from-file@v5
with:
title: Broken links detected 🔗
issue-number: "${{ steps.broken-link-check-issue.outputs.issue-number }}"
content-filepath: ./lychee/out.md
token: "${{ steps.generate-token.outputs.token }}"
labels: |
broken-links