-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.61 KB
/
site.links.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
# Workflow to check broken links across the site.
# If you're wondering why I use a workflow instead of integrating it in the 11ty build pipeline,
# it's because I want the flexibility to check links regularly, without having to run build each time.
# If you post and update your blog regularly, then fine by me. But I forsee myself taking a hiatus once
# in a blue moon, and I rather the system alert me rather than me manually checking each week.
name: Check Broken Links
on:
# repository_dispatch:
workflow_dispatch:
schedule:
- cron: "00 11 * * 2,5" # HKT 7PM Tuesday/Friday
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: site
# - name: Restore Lychee Cache
# uses: actions/cache@v3
# with:
# path: .lycheecache
# key: cache-lychee-${{ github.sha }}
# restore-keys: cache-lychee-
- name: Check Links
id: lychee
uses: lycheeverse/lychee-action@v2
with:
args: --base _site --accept 100..=103,200..=299,403,429 --user-agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' --timeout 60 --no-progress --include-verbatim --include-fragments --exclude-path _site/404.html _site
jobSummary: true
fail: true
# - 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