Skip to content

Commit 7871870

Browse files
authored
feat: add PR link checking workflow
1 parent e8dbc45 commit 7871870

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: PR Links
2+
3+
on:
4+
pull_request:
5+
branches: [redesign]
6+
workflow_dispatch:
7+
8+
jobs:
9+
linkChecker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v6
13+
with:
14+
persist-credentials: false
15+
16+
- name: Build site
17+
uses: withastro/action@15aa0a5a1e067940253e3b259413ab2ae882a740 # v5.2.0
18+
19+
- name: Check links
20+
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2.7.0
21+
with:
22+
# Remap live URLs to build directory because the links are potentially not live (not yet on master)
23+
args: |
24+
--root-dir $PWD/dist
25+
--exclude-all-private
26+
dist/
27+
fail: true
28+
29+
- name: Suggestions
30+
if: failure()
31+
run: |
32+
echo -e "\nPlease review the links reported in the 'Check links in PR changes' step above."
33+
echo -e "If a link is valid but fails due to a CAPTCHA challenge, IP blocking, login requirements, etc.,"
34+
echo -e "consider adding such links to .lycheeignore file to bypass future checks.\n"
35+
exit 1

0 commit comments

Comments
 (0)