-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,29 @@ jobs: | |
env: | ||
JEKYLL_ENV: production | ||
|
||
- name: Check validity of links | ||
uses: lycheeverse/[email protected] | ||
with: | ||
# Reasons for exclude | ||
# - https://root.cern/[0-9]+: Breaks checking local builds due to links in the metadata | ||
# - 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. | ||
# - rootbnch-grafana-test.cern.ch: Breaks due to SSO | ||
# - lcgapp-services.cern.ch: Breaks due to SSO | ||
# - indico.desy.de: Returns frequently error code 403 | ||
# - https://www.sciencedirect.com: frequent 403 errors | ||
# - nbviewer: When notebook generation fails, nbviewer returns 404 errors, and errors might even be cached in CDNs for a while | ||
# - lcginfo.cern.ch: does not support HTTPS, see https://sft.its.cern.ch/jira/browse/SPI-1672 | ||
# - http://simul.iro.umontreal.ca/testu01/tu01.html does not support HTTPS | ||
# Reasons for file-ignore | ||
# - Broken links in historic ROOT v5 release notes | ||
|
||
args: --base build --verbose --no-progress \ | ||
--exclude-path "/.*root-version-v5.*/" \ | ||
--exclude "https://rootbnch-grafana-test.cern.ch/.*|https://lcgapp-services.cern.ch/root-jenkins/*|https://indico.desy.de/.*|https://nbviewer.jupyter.org/.*|https://www.sciencedirect.com)/" \ | ||
--include-fragments | ||
# Fail action on broken links | ||
fail: true | ||
|
||
- name: Only allow links to root.cern, never root.cern.ch | ||
run: | | ||
grep -n -R 'root\.cern\.ch' build || exit 0 # grep returns non-zero if no match is found | ||
|