-
Notifications
You must be signed in to change notification settings - Fork 159
51 lines (46 loc) · 1.13 KB
/
link-check.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
45
46
47
48
49
50
51
name: Link Checker
on:
workflow_dispatch:
schedule:
# Run daily at 9am
- cron: "00 9 * * *"
push:
branches:
- main
paths:
- "**.md"
- "**.mdx"
- "**.html"
- ".github/workflows/link-check.yml"
merge_group:
pull_request:
branches:
- main
paths:
- "**.md"
- "**.mdx"
- "**.html"
- ".github/workflows/link-check.yml"
jobs:
link-check:
name: Link Check
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@v4
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
with:
args: --config ./.config/lychee.toml './**/*.md' './**/*.mdx' './**/*.html'
- name: Create Issue From File
if: env.lychee_exit_code != 0 && github.event_name == 'schedule'
uses: peter-evans/create-issue-from-file@v5
with:
title: Link Checker Report
content-filepath: ./lychee-report.md
- name: Fail job on error
if: env.lychee_exit_code != 0 && github.event_name != 'schedule'
run: exit 1