Link Check #8667
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 Check" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 * * * *" | |
jobs: | |
link-check: | |
name: Link Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
- name: Restore lychee cache | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
path: .lycheecache | |
key: cache-lychee-${{ github.sha }} | |
restore-keys: cache-lychee- | |
- name: Link Checker | |
uses: lycheeverse/lychee-action@ec3ed119d4f44ad2673a7232460dc7dff59d2421 # v1.8.0 | |
id: lychee | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
with: | |
args: > | |
--cache | |
--max-cache-age 1d | |
--verbose | |
--no-progress | |
--exclude-mail | |
'./**/*.md' | |
- name: Find Link Checker Issue | |
id: link-checker-issue | |
uses: micalevisk/last-issue-action@f5661581217cc78cc282d1351aa65bd8bd155003 # v2.2.1 | |
with: | |
state: open | |
labels: | | |
broken-links | |
- name: Update Issue | |
uses: peter-evans/create-issue-from-file@433e51abf769039ee20ba1293a088ca19d573b7f # renovate: tag=v4.0.1 | |
with: | |
title: Broken links detected 🔗 | |
issue-number: "${{ steps.link-checker-issue.outputs.issue-number }}" | |
content-filepath: ./lychee/out.md | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
labels: | | |
broken-links |