Skip to content

Commit b73b404

Browse files
Axel-Naumannguitargeek
authored andcommitted
CI: add link-checker.
Fixes root-project#953
1 parent 871d587 commit b73b404

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/continuous-integration-workflow.yml

+20
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,26 @@ jobs:
3737
env:
3838
JEKYLL_ENV: production
3939

40+
- name: Check validity of links
41+
uses: lycheeverse/[email protected]
42+
with:
43+
# Reasons for exclude
44+
# - https://root.cern/[0-9]+: Breaks checking local builds due to links in the metadata
45+
# - https://root.cern/(?!(files|download|doc)): Checking links to the deployed website breaks appearing in the metadata of newly added webpages. Exceptions are links to files, download and doc, which are not part of the Jekyll setup.
46+
# - rootbnch-grafana-test.cern.ch: Breaks due to SSO
47+
# - lcgapp-services.cern.ch: Breaks due to SSO
48+
# - indico.desy.de: Returns frequently error code 403
49+
# - https://www.sciencedirect.com: frequent 403 errors
50+
# - nbviewer: When notebook generation fails, nbviewer returns 404 errors, and errors might even be cached in CDNs for a while
51+
# - lcginfo.cern.ch: does not support HTTPS, see https://sft.its.cern.ch/jira/browse/SPI-1672
52+
# - http://simul.iro.umontreal.ca/testu01/tu01.html does not support HTTPS
53+
# Reasons for file-ignore
54+
# - Broken links in historic ROOT v5 release notes
55+
# add `--include-fragments` once released!
56+
args: --base build --no-progress --exclude-mail --exclude-path 'build/install/all_releases/' --exclude https://rootbnch-grafana-test.cern.ch --exclude https://lcgapp-services.cern.ch/root-jenkins --exclude https://indico.desy.de --exclude https://nbviewer.jupyter.org --exclude https://www.sciencedirect.com --exclude https://github.com/root-project/web/tree/ --exclude https://twitter.com/ROOT_Project 'build/**/*.html'
57+
# Fail action on broken links
58+
fail: true
59+
4060
- name: Only allow links to root.cern, never root.cern.ch
4161
run: |
4262
grep -n -R 'root\.cern\.ch' build || exit 0 # grep returns non-zero if no match is found

0 commit comments

Comments
 (0)