Skip to content

Commit d980ecf

Browse files
berquistleios
authored andcommitted
Prevent Travis from deploying the book, even when it fails. (#392)
https://docs.travis-ci.com/user/customizing-the-build/#customizing-the-build-step Placing the deployment in `after_success` works around the fact that all commands under `script` run even when one or more of them return a non-zero exit code.
1 parent af071d7 commit d980ecf

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.travis.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ language: node_js
55
node_js:
66
- "4"
77

8-
# cache:
9-
# directories:
10-
# - node_modules
11-
128
install:
139
- npm install gitbook-cli -g
1410
- gitbook install
@@ -17,9 +13,11 @@ before_script:
1713
- mkdir -p "${TRAVIS_BUILD_DIR}"/build
1814

1915
script:
20-
- gitbook build . "${TRAVIS_BUILD_DIR}"/build
2116
- env | sort
22-
- |
17+
- gitbook build . "${TRAVIS_BUILD_DIR}"/build
18+
19+
after_success:
20+
- |
2321
if [[ "${TRAVIS_BRANCH}" == master && "${TRAVIS_PULL_REQUEST}" == false ]]; then
2422
# Commits to master that are not pull requests, that is, only
2523
# actual addition of code to master, should deploy the book to

0 commit comments

Comments
 (0)