File tree 3 files changed +5
-10
lines changed
3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 57
57
cargo install mdbook-mermaid --version ${{ env.MDBOOK_MERMAID_VERSION }}
58
58
59
59
- name : Check build
60
- run : ENABLE_LINKCHECK=1 mdbook build
60
+ run : mdbook build
61
61
62
62
- name : Deploy to gh-pages
63
63
if : github.event_name == 'push'
Original file line number Diff line number Diff line change @@ -57,13 +57,8 @@ The build files are found in the `book/html` directory.
57
57
### Link Validations
58
58
59
59
We use ` mdbook-linkcheck2 ` to validate URLs included in our documentation. Link
60
- checking is ** not** run by default locally, though it is in CI. To enable it
61
- locally, set the environment variable ` ENABLE_LINKCHECK=1 ` like in the
62
- following example.
63
-
64
- ``` console
65
- $ ENABLE_LINKCHECK=1 mdbook serve
66
- ```
60
+ checking is run locally only if the ` mdbook-linkcheck2 ` crate is installed. Otherwise,
61
+ a warning is printed to the user.
67
62
68
63
### Table of Contents
69
64
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ set_github_token() {
9
9
jq ' .config.output.linkcheck."http-headers"."github\\.com" = ["Authorization: Bearer $GITHUB_TOKEN"]'
10
10
}
11
11
12
- if [ -z " $ENABLE_LINKCHECK " ] ; then
13
- echo " Skipping link check."
12
+ if ! which $LINKCHECK_BINARY & > /dev/null && [ -z " $GITHUB_EVENT_NAME " ] ; then
13
+ echo " WARNING: Skipping link check. Consider running 'cargo install $LINKCHECK_BINARY ' ."
14
14
exit 0
15
15
fi
16
16
You can’t perform that action at this time.
0 commit comments