aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-02-09 17:33:19 +0000
committerGitHub <noreply@github.com>2022-02-09 17:33:19 +0000
commit1464898291fbd7ae0aa3fddcc185a69d9d3979a4 (patch)
tree07c902f05243a69053686a0d73aaf186c71f03f9 /.github/workflows/build.yml
parentab26a1e185f0c18d09937e9e7296a67ca5ad1baf (diff)
parent120d3109342ec34aed473d36e1d81b0039ce5ba4 (diff)
Merge #604
604: docs: make mdBook emit error codes r=korken89 a=AfoHT Co-authored-by: Henrik Tjäder <henrik@grepit.se>
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml15
1 files changed, 11 insertions, 4 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d2b45c4..fc07519 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -458,10 +458,12 @@ jobs:
mdbook-version: 'latest'
- name: Build book in English
- run: cd book/en && mdbook build
+ shell: 'script --return --quiet --command "bash {0}"'
+ run: cd book/en && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi
- name: Build book in Russian
- run: cd book/ru && mdbook build
+ shell: 'script --return --quiet --command "bash {0}"'
+ run: cd book/ru && if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then echo "Russian book needs updating!"; else exit 0; fi
- name: Check links
run: |
@@ -518,6 +520,7 @@ jobs:
run: cargo doc
- name: Build books
+ shell: 'script --return --quiet --command "bash {0}"'
run: |
langs=( en ru )
devver=( dev )
@@ -549,7 +552,9 @@ jobs:
# Build books
for lang in ${langs[@]}; do
- ( cd book/$lang && mdbook build )
+ ( cd book/$lang &&
+ if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi
+ )
cp -r book/$lang/book $td/$devver/book/$lang
cp LICENSE-* $td/$devver/book/$lang/
done
@@ -569,7 +574,9 @@ jobs:
cp -r target/doc $td/$prefix/api
sed 's|URL|rtic/index.html|g' $root/redirect.html > $td/$prefix/api/index.html
for lang in ${langs[@]}; do
- ( cd book/$lang && mdbook build )
+ ( cd book/$lang &&
+ if mdbook build |& tee /dev/tty | grep "\[ERROR\]"; then exit 1; else exit 0; fi
+ )
cp -r book/$lang/book $td/$prefix/book/$lang
cp LICENSE-* $td/$prefix/book/$lang/
done