File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 18
18
if [ " $GITHUB_EVENT_NAME " = " schedule" ] ; then # running in scheduled job
19
19
FLAGS=" "
20
20
USE_TOKEN=1
21
+ FOLLOW_WEB_LINKS=" true"
21
22
22
23
echo " Doing full link check."
23
24
elif [ " $GITHUB_EVENT_NAME " = " pull_request" ] ; then # running in PR CI build
@@ -26,13 +27,18 @@ elif [ "$GITHUB_EVENT_NAME" = "pull_request" ] ; then # running in PR CI build
26
27
exit 1
27
28
fi
28
29
30
+ # External links should not block PR CI because they can fail due to network
31
+ # conditions or server conditions of the external links, which is beyond the
32
+ # control of contributors.
33
+ FOLLOW_WEB_LINKS=" false"
29
34
CHANGED_FILES=$( git diff --name-only $BASE_SHA ... | sed ' s#^src/##' | tr ' \n' ' ' )
30
35
FLAGS=" --no-cache -f $CHANGED_FILES "
31
36
USE_TOKEN=1
32
37
33
38
echo " Checking files changed since $BASE_SHA : $CHANGED_FILES "
34
39
else # running locally
35
40
COMMIT_RANGE=master...
41
+ FOLLOW_WEB_LINKS=" true"
36
42
CHANGED_FILES=$( git diff --name-only $COMMIT_RANGE | sed ' s#^src/##' | tr ' \n' ' ' )
37
43
FLAGS=" -f $CHANGED_FILES "
38
44
42
48
echo " exec $LINKCHECK_BINARY $FLAGS "
43
49
if [ " $USE_TOKEN " = 1 ]; then
44
50
config=$( set_github_token)
45
- exec $LINKCHECK_BINARY $FLAGS <<< " $config"
51
+ exec env MDBOOK_OUTPUT__LINKCHECK__FOLLOW_WEB_LINKS= $FOLLOW_WEB_LINKS $LINKCHECK_BINARY $FLAGS <<< " $config"
46
52
else
47
- exec $LINKCHECK_BINARY $FLAGS
53
+ exec env MDBOOK_OUTPUT__LINKCHECK__FOLLOW_WEB_LINKS= $FOLLOW_WEB_LINKS $LINKCHECK_BINARY $FLAGS
48
54
fi
You can’t perform that action at this time.
0 commit comments