generated from sosiristseng/template-mkdocs-material
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (41 loc) · 1.14 KB
/
linkcheck.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Check markdown links
on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "00 18 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linkcheck:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- 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: '--accept 200,204,429 --verbose --no-progress --cache --max-cache-age 1d docs/'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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