From 90f747a2a9432e36c62047916e42cf8403a42255 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Mon, 9 Sep 2019 13:46:47 +0200 Subject: [PATCH] Don't deploy if you're not on `master` Thank you: https://github.com/travis-ci/travis-ci/issues/5419#issuecomment-222815942 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 552534b66..e514fc37a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,11 +22,11 @@ deploy: api_key: $NPM_TOKEN on: tags: true - branch: master + condition: $(git branch --contains $TRAVIS_TAG | grep -l '^[\* ] master$') - provider: pages skip_cleanup: true github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable keep_history: true on: tags: true - branch: master + condition: $(git branch --contains $TRAVIS_TAG | grep -l '^[\* ] master$')