Skip to content

Commit 9bf38d9

Browse files
committed
Add workflow to detect broken links
This action[0] has many more configurations, but I think these should be enough to capture what we want. It's built on my CLI tool urlsup[1]. [0]: https://github.com/simeg/urlsup-action [1]: https://github.com/simeg/urlsup
1 parent f842f91 commit 9bf38d9

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/check_links.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Validate URLs
2+
3+
on:
4+
schedule:
5+
- cron: '0 9 * * 1' # Every Monday at 9 AM UTC
6+
workflow_dispatch: # Allow manual trigger
7+
pull_request: # Just to make sure the initial PR works, this can
8+
# later be removed
9+
10+
jobs:
11+
validate-urls:
12+
runs-on: ubuntu-latest
13+
name: Validate repository URLs
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Validate URLs
20+
id: validate-urls
21+
uses: simeg/[email protected]
22+
with:
23+
files: '.' # Check here
24+
recursive: true # Include sub-dirs
25+
include-extensions: 'md' # File types to check
26+
27+
timeout-seconds: 5 # Request timeout in seconds
28+
retry: 2 # Number of retries
29+
concurrency: 10 # Concurrent requests
30+
31+
allow-status: '200,202,204,429' # Allowed HTTP status codes
32+
allowlist: 'http://localhost' # Trusted domains
33+
34+
user-agent: 'awesome-nodejs/1.0'
35+

0 commit comments

Comments
 (0)