Link Checker #387
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Link Checker | |
on: # yamllint disable-line rule:truthy | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- next | |
schedule: | |
- cron: "0 0 * * *" # Every day at midnight | |
jobs: | |
link-checker: | |
name: Link Checker | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Generate Token | |
uses: actions/create-github-app-token@v1 | |
id: generate-token | |
with: | |
app-id: "${{ secrets.BOT_APP_ID }}" | |
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: "${{ steps.generate-token.outputs.token }}" | |
fetch-depth: 0 | |
- name: Link Checker | |
uses: lycheeverse/[email protected] | |
id: lychee | |
env: | |
GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}" | |
- name: Find Link Checker Issue | |
id: link-checker-issue | |
uses: micalevisk/last-issue-action@v2 | |
with: | |
state: open | |
labels: | | |
link-checker | |
- name: Update Issue | |
uses: peter-evans/create-issue-from-file@v5 | |
with: | |
title: Broken links detected in docs 🔗 | |
issue-number: "${{ steps.link-checker-issue.outputs.issue_number }}" | |
content-filepath: ./lychee/out.md | |
token: "${{ steps.generate-token.outputs.token }}" | |
labels: | | |
link-checker |