From 9478882bd5ccb1745079cf08daaa059c385f4b25 Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Sun, 17 Dec 2017 17:30:56 -0600 Subject: [PATCH] travis: only deploy master --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bf46964..8321540 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,13 +9,13 @@ script: - hugo after_success: | - if [ -n "$GITHUB_TOKEN" ]; then + if [ -n "$GITHUB_TOKEN" ] && [ "$TRAVIS_BRANCH" -eq "master" ]; then cd "$TRAVIS_BUILD_DIR" cd public git init git checkout -b master git add . - git -c user.name='cwpearson' -c user.email='carl.w.pearson@gmail.com' commit -m "push from hugo-cwpearson $TRAVIS_BRANCH $TRAVIS_COMMIT" + git -c user.name='cwpearson' -c user.email='carl.w.pearson@gmail.com' commit -m "push from hugo-cwpearson $TRAVIS_COMMIT" # Make sure to make the output quiet, or else the API token will leak! # This works because the API key can replace your password. git push -f -q https://cwpearson:$GITHUB_TOKEN@github.com/cwpearson/cwpearson.github.io master 2> /dev/null