From ee4fb864009bc87df0abbc0489fc437eac517026 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Tue, 19 Jun 2018 13:47:44 -0700 Subject: [PATCH] ci: Don't run before_deploy unless DEPLOY=1 The before_deploy commands are for when we are building release tarballs, and we don't want to do that for when we are deploying the guide to gh-pages. --- .travis.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7f2d8b3d..5e6b2441 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,7 +69,6 @@ matrix: # Build the guide. - rust: stable - env: DEPLOY=0 script: (cd guide && cargo install mdbook --vers "^0.1.0" && mdbook build) deploy: provider: pages @@ -93,11 +92,14 @@ notifications: on_success: never before_deploy: - - name="wasm-bindgen-$TRAVIS_TAG-$TARGET" - - mkdir $name - - cp target/$TARGET/release/{wasm-bindgen,wasm2es6js} $name/ - - cp README.md LICENSE-MIT LICENSE-APACHE $name/ - - tar czvf $name.tar.gz $name + | + if [[ "$DEPLOY" == "1" ]]; then + name="wasm-bindgen-$TRAVIS_TAG-$TARGET" + mkdir "$name" + cp "target/$TARGET/release/{wasm-bindgen,wasm2es6js}" "$name/" + cp README.md LICENSE-MIT LICENSE-APACHE "$name/" + tar czvf "$name.tar.gz" "$name" + fi deploy: api_key: