Skip to content

Commit 84fdece

Browse files
authored
feat(links): add external link checker (#778)
2 parents 62c0433 + 4279445 commit 84fdece

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Check External Links
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
check-external-links:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
steps:
14+
- name: Restore lychee cache
15+
uses: actions/cache@v4
16+
with:
17+
path: .lycheecache
18+
key: cache-lychee-${{ github.sha }}
19+
restore-keys: cache-lychee-
20+
- uses: actions/checkout@v4
21+
- name: Link Checker
22+
id: lychee
23+
uses: lycheeverse/lychee-action@v2
24+
with:
25+
lycheeVersion: "latest"
26+
args: |
27+
--cache
28+
--verbose
29+
--accept '100..=103,200..=299,400,403'
30+
--base https://dev.flare.network/
31+
--no-progress
32+
--insecure
33+
--exclude '^(/|https://dev\.flare\.network/|https?://localhost(?::[0-9]+)?/|https://fdc-verifiers-testnet\.flare\.network/|https://github\.com/flare-foundation/flare-hardhat-starter/|https://github\.com/flare-foundation/flare-foundry-starter/|https://sepolia\.etherscan\.io/|https://metamask\.io/|https://openweathermap\.org/|https://www\.gnu\.org/)'
34+
.
35+
fail: true
36+
env:
37+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
38+
- name: Create Issue From File
39+
if: steps.lychee.outputs.exit_code != 0
40+
uses: peter-evans/create-issue-from-file@v5
41+
with:
42+
title: Link Checker Report
43+
content-filepath: ./lychee/out.md
44+
labels: report, automated issue

.github/workflows/lint-check-links.yml renamed to .github/workflows/lint-check-internal-links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint and Check Links
1+
name: Lint and Check Internal Links
22

33
on:
44
pull_request:

0 commit comments

Comments
 (0)