-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (52 loc) · 1.43 KB
/
link-checker.yaml
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
52
53
54
name: Check URLs with Lychee
"on":
pull_request:
branches: [main]
paths:
- "**.adoc"
- "**.html"
- "**.md"
- .github/workflows/link-checker.yaml
- flake.lock
- lychee.toml
push:
branches: [main]
paths:
- "**.adoc"
- "**.html"
- "**.md"
- .github/workflows/link-checker.yaml
- flake.lock
- lychee.toml
schedule:
# Run once a month on the 14th.
- cron: "0 0 14 * *"
workflow_dispatch:
jobs:
link-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v15
- uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Restore lychee cache
id: cache-lychee-restore
uses: actions/cache/restore@v4
with:
key: lychee-cache
path: .lycheecache
# todo Cache bundler stuff?
- name: Build with Jekyll
run: nix build
- name: Convert the README files to html
run: nix develop --command asciidoctor {CODE_OF_CONDUCT,LICENSE,README}.adoc
- name: Run lychee on the generated site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: nix develop --command lychee --cache --no-progress --verbose result/srv/ ./*.html
- name: Save lychee cache
uses: actions/cache/save@v4
if: always()
with:
key: lychee-cache
path: .lycheecache