File tree 2 files changed +28
-20
lines changed 2 files changed +28
-20
lines changed Original file line number Diff line number Diff line change 1
- name : Broken Link Check
1
+ name : Broken Links Check
2
2
3
3
on :
4
4
workflow_dispatch :
5
5
schedule :
6
- - cron : ' 3 3 * * 0'
6
+ - cron : " 3 3 * * 0"
7
7
8
8
concurrency :
9
9
group : ${{ github.workflow }}-${{ github.ref }}
@@ -12,25 +12,31 @@ concurrency:
12
12
jobs :
13
13
broken-link-checker :
14
14
runs-on : ubuntu-latest
15
+ if : github.repository == 'owncast/owncast.github.io'
16
+
17
+ defaults :
18
+ run :
19
+ working-directory : ./scripts/linkchecker
20
+
15
21
steps :
16
- - uses : actions/checkout@v2
22
+ - name : Check out web site code
23
+ uses : actions/checkout@v2
17
24
with :
18
- submodules : true # Fetch Hugo themes (true OR recursive)
19
- fetch-depth : 0 # Fetch all history for .GitInfo and .Lastmod
25
+ fetch-depth : 0
20
26
21
- - name : Setup Hugo
22
- uses : peaceiris/actions-hugo@v2
27
+ - name : Download lychee
28
+ run : |
29
+ wget https://github.com/lycheeverse/lychee/releases/download/v0.14.3/lychee-v0.14.3-x86_64-unknown-linux-gnu.tar.gz && tar xvf lychee-v0.14.3-x86_64-unknown-linux-gnu.tar.gz
30
+
31
+ - name : Setup nodejs
32
+ uses : actions/setup-node@v4
23
33
with :
24
- hugo-version : " 0.120.4"
25
- extended : true
34
+ node-version : latest
26
35
27
- - name : Build
28
- run : npm install && hugo --minify
36
+ - name : Install dependencies
37
+ run : npm install
29
38
30
- - name : Check broken links
31
- uses : ruzickap/action-my-broken-link-checker@v2
32
- with :
33
- url : https://owncast.online/docs
34
- pages_path : ./public/
35
- cmd_params : ' --buffer-size=8192 --max-connections=10 --color=always --rate-limit=1 --max-connections-per-host 3 --skip-tls-verification --exclude="opencollective.com|github.com|example.com|mydomain.com|sitemap" --verbose'
36
- debug : true
39
+ - name : Run link checker
40
+ run : ./run.sh
41
+ env :
42
+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
Original file line number Diff line number Diff line change 1
- ./lychee --github-token $GITHUB_TOKEN --exclude-path ../../content/releases -f json https://owncast.online/docs ../../content > links.json
2
- GITHUB_TOKEN=$GITHUB_TOKEN node main.js
1
+ #! /bin/sh
2
+
3
+ ./lychee --github-token " $GITHUB_TOKEN " --exclude-path ../../content/releases -f json https://owncast.online/docs ../../content > links.json
4
+ GITHUB_TOKEN=" $GITHUB_TOKEN " node main.js
You can’t perform that action at this time.
0 commit comments