[CI] Fix deploy condition

This commit is contained in:
JAremko 2019-12-04 17:48:24 +02:00 committed by Eugene Yaremenko
parent d0f860f7c7
commit 70cfe750d5
1 changed files with 9 additions and 13 deletions

View File

@ -17,13 +17,7 @@ env:
before_script:
- docker pull jare/spacetools:latest
script:
- git checkout "${TRAVIS_BRANCH}"
before_deploy:
- >
if ! [ "$BEFORE_DEPLOY_RUN" ]; then
export BEFORE_DEPLOY_RUN=1;
.travisci/pub_prep.sh
fi
- git checkout "${TRAVIS_BRANCH}" && .travisci/pub_prep.sh
deploy:
- provider: script
skip_cleanup: true
@ -32,9 +26,10 @@ deploy:
branch: develop
# Deploy only if we are in the official repo and
# the local revision matches origin's head
condition: $TRAVIS_REPO_SLUG = $SPACEMACS_REPO_SLUG && \
$(git remote update) && \
$(git rev-parse '@') = $(git rev-parse '@{u}')
condition: |
$TRAVIS_REPO_SLUG = $SPACEMACS_REPO_SLUG AND \
$(git remote update) AND \
$(git rev-parse '@') = $(git rev-parse '@{u}')
- provider: script
skip_cleanup: true
script: ".travisci/pub_html.sh"
@ -42,6 +37,7 @@ deploy:
all_branches: true
# Deploy only if we are in the official repo and
# the local revision matches origin's head
condition: $TRAVIS_REPO_SLUG = $SPACEMACS_REPO_SLUG && \
$(git remote update) && \
$(git rev-parse '@') = $(git rev-parse '@{u}')
condition: |
$TRAVIS_REPO_SLUG = $SPACEMACS_REPO_SLUG AND \
$(git remote update) AND \
$(git rev-parse '@') = $(git rev-parse '@{u}')