Skip to content

Commit

Permalink
link check
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Feb 6, 2024
1 parent a3ba169 commit 2d4a939
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/lychee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@ name: Check markdown links
on:
workflow_dispatch:
# schedule:
# - cron: "0 0 * * 1" # Every Monday
# - cron: '0 0 1 * *' # Every month

jobs:
linkChecker:
linkcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Link Checker
id: lychee
- name: Checkout
uses: actions/checkout@v4
- name: Restore lychee cache
id: restore-cache
uses: actions/cache@v4
with:
save-always: 'true'
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Lychee Checker
uses: lycheeverse/lychee-action@v1.9.3
id: lychee
with:
args: "**.md --accept 200,204,429 --verbose --no-progress"
fail: true
args: '--accept 200,204,429 --verbose --no-progress --cache --max-cache-age 1d .'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Issue From File
if: ${{ steps.lychee.outputs.exit_code }} != 0
uses: peter-evans/create-issue-from-file@v5
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: report

0 comments on commit 2d4a939

Please sign in to comment.