Repository navigation
63 lines (52 loc) · 1.71 KB
/
Copy pathvalidate-links.yml
File metadata and controls
63 lines (52 loc) · 1.71 KB
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
55
56
57
58
59
60
61
62
63
name: Validate links
on:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
concurrency:
group: validate-links-${{ github.ref }}
cancel-in-progress: true
permissions:
issues: write
contents: read
jobs:
link-checker:
name: Link checker
runs-on: ubuntu-26.04
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
- name: Setup Node
uses: actions/setup-node@v7
with:
cache: pnpm
node-version-file: .nvmrc
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build site
run: pnpm build
- id: lychee
name: Check links
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
with:
args: "--verbose --no-progress --root-dir ${{ github.workspace }}/dist './README.md' './dist/**/*.html'"
fail: false
- if: steps.lychee.outputs.exit_code != 0
name: Create issue
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0
with:
title: Link checker report
labels: 'report, automated-issue'
content-filepath: ./lychee/out.md
- if: steps.lychee.outputs.exit_code != 0
name: Assign issues
uses: gustavofreze/auto-assign@3c8ebe3f6f2cc5b92bb8969f13bc5886895f70e3 # 2.1.1
with:
assignees: '${{ vars.ASSIGNEES }}'
github_token: '${{ secrets.GITHUB_TOKEN }}'
allow_self_assign: 'true'
allow_no_assignees: 'true'
assignment_options: 'ISSUE'