File tree Expand file tree Collapse file tree 2 files changed +28
-20
lines changed Expand file tree Collapse file tree 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
22
33on :
44 workflow_dispatch :
55 schedule :
6- - cron : ' 3 3 * * 0'
6+ - cron : " 3 3 * * 0"
77
88concurrency :
99 group : ${{ github.workflow }}-${{ github.ref }}
@@ -12,25 +12,31 @@ concurrency:
1212jobs :
1313 broken-link-checker :
1414 runs-on : ubuntu-latest
15+ if : github.repository == 'owncast/owncast.github.io'
16+
17+ defaults :
18+ run :
19+ working-directory : ./scripts/linkchecker
20+
1521 steps :
16- - uses : actions/checkout@v2
22+ - name : Check out web site code
23+ uses : actions/checkout@v2
1724 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
2026
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
2333 with :
24- hugo-version : " 0.120.4"
25- extended : true
34+ node-version : latest
2635
27- - name : Build
28- run : npm install && hugo --minify
36+ - name : Install dependencies
37+ run : npm install
2938
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