Skip to content

Commit

Permalink
Specify deployment script for both branch and tags (#268)
Browse files Browse the repository at this point in the history
The matching conditions for the deployment process can't be too
complicated, so a duplicated block with a different `on` condition
is the workaround.

Additionally, rename `deploy-site.sh` to `deploy.sh`

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
  • Loading branch information
gpampara authored Feb 13, 2018
1 parent ca2a54e commit 2e75cc0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ script:
- sbt "++${TRAVIS_SCALA_VERSION}" "^^${SBT_VERSION}" $COMMAND

before_install:
- if [ $TRAVIS_PULL_REQUEST = "false" ]; then
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
openssl aes-256-cbc -K $encrypted_1444cb71e00b_key -iv $encrypted_1444cb71e00b_iv -in project/secrets.tar.enc -out local.secrets.tar -d;
tar -xf local.secrets.tar -C project;
fi
Expand All @@ -33,17 +33,23 @@ before_deploy:
# Start ssh-agent in the background and load the deploy key
- eval "$(ssh-agent -s)"
- ssh-add project/travis-deploy-key
- chmod a+x project/deploy-site.sh
- chmod a+x project/deploy.sh

deploy:
provider: script
script: ./project/deploy-site.sh
skip_cleanup: true
on:
branch: series/2.0.x
jdk: oraclejdk9
scala: 2.12.4
condition: $TRAVIS_PULL_REQUEST = false
- provider: script
script: ./project/deploy.sh
skip_cleanup: true
on:
jdk: oraclejdk9
scala: 2.12.4
branch: series/2.0.x
- provider: script
script: ./project/deploy.sh
skip_cleanup: true
on:
jdk: oraclejdk9
scala: 2.12.4
tags: true

notifications:
email:
Expand Down
File renamed without changes.

0 comments on commit 2e75cc0

Please sign in to comment.