-
Notifications
You must be signed in to change notification settings - Fork 18
37 lines (32 loc) · 1.08 KB
/
check-pr-links.yml
File metadata and controls
37 lines (32 loc) · 1.08 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
name: PR Links
on:
pull_request:
branches: [master]
workflow_dispatch:
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Build site
uses: withastro/action@v5
with:
package-manager: pnpm@latest
- name: Check links
uses: lycheeverse/lychee-action@v2
with:
# Remap live URLs to build directory because the links are potentially not live (not yet on master)
args: |
--root-dir $PWD/dist
--exclude-all-private
--remap 'https://lychee\.cli\.rs/(.*)/ file://'$PWD'/dist/$1/index.html'
dist/
src/
fail: true
- name: Suggestions
if: failure()
run: |
echo -e "\nPlease review the links reported in the 'Check links in PR changes' step above."
echo -e "If a link is valid but fails due to a CAPTCHA challenge, IP blocking, login requirements, etc.,"
echo -e "consider adding such links to .lycheeignore file to bypass future checks.\n"
exit 1