Check Links #307
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: Check Links | |
"on": | |
repository_dispatch: | |
workflow_dispatch: | |
schedule: | |
# Every day at 10:27 AM UTC | |
# The time is random, don't think about it too much | |
- cron: "27 10 * * *" | |
jobs: | |
linkChecker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Restore lychee cache | |
id: restore-cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: .lycheecache | |
key: cache-lychee-${{ github.sha }} | |
restore-keys: cache-lychee- | |
- name: Run lychee | |
uses: lycheeverse/[email protected] | |
with: | |
args: "--base . --verbose --no-progress --cache --max-cache-age 3d 'docs/**/*.md'" | |
- name: Save lychee cache | |
uses: actions/cache/save@v4 | |
if: always() | |
with: | |
path: .lycheecache | |
key: ${{ steps.restore-cache.outputs.cache-primary-key }} | |
- name: Create Issue From File | |
if: env.lychee_exit_code != 0 | |
uses: peter-evans/create-issue-from-file@v5 | |
with: | |
title: Link Checker Report | |
content-filepath: ./lychee/out.md | |
labels: report, automated issue |