From ee2d6cc252c048c8edd7ad5dcdc367df628f4d7d Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Sat, 30 Dec 2017 15:14:22 +0200 Subject: [PATCH] Travis update --- .travis/push.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.travis/push.sh b/.travis/push.sh index c0be60223..17ee111d6 100755 --- a/.travis/push.sh +++ b/.travis/push.sh @@ -4,14 +4,17 @@ setup_git() { } commit_website_files() { - git checkout master - git add * - git commit --message "Travis build: $TRAVIS_BUILD_NUMBER" + if [[ $(( $TRAVIS_EVENT_TYPE )) != 'pull_request' ]]; then + if [[ $(( $TRAVIS_BRANCH )) != 'master' ]]; then + git checkout master + git add * + git commit --message "Travis build: $TRAVIS_BUILD_NUMBER" + fi + fi } upload_files() { - echo "https://${GH_TOKEN}@github.com/Chalarangelo/30-seconds-of-code.git" - git push --force "https://${GH_TOKEN}@github.com/Chalarangelo/30-seconds-of-code.git" master > /dev/null 2>&1 + git push --force --quiet "https://${GH_TOKEN}@github.com/Chalarangelo/30-seconds-of-code.git" master > /dev/null 2>&1 } setup_git