diff --git a/.travis.yml b/.travis.yml index dd062c5..d99ce5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,12 @@ python: "3.5" # command to install dependencies install: pip install 'Nikola[extras]' # command to run tests -script: nikola build -after_success: | - [ $TRAVIS_BRANCH = master ] && - [ $TRAVIS_PULL_REQUEST = false ] && - virtualenv -p python2.7 /tmp/venv && - . /tmp/venv/bin/activate && - pip install ghp-import && - ghp-import -n output && - git push -qf https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages >/dev/null 2>&1 +script: | + nikola build && + if [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ]; then + virtualenv -p python2.7 /tmp/venv && + . /tmp/venv/bin/activate && + pip install ghp-import && + ghp-import -n output && + git push -qf https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages >/dev/null 2>&1 + fi