-
-
Save visar/73a9a11e962ea63e6ee9ae2fddd28bef to your computer and use it in GitHub Desktop.
Travis CI Gigalixir Deploy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: elixir | |
elixir: 1.5.2 | |
otp_release: '19.0' | |
script: | |
- mix test && ./deploy.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git remote add gigalixir https://$GIGALIXIR_EMAIL:[email protected]/$GIGALIXIR_APP_NAME.git | |
BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) | |
echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR" | |
echo "------------------------------------" | |
echo "BRANCH=$BRANCH" | |
if [ "$BRANCH" == "master" ]; then | |
echo "Pushing HEAD to master branch on Gigalixir." | |
git push gigalixir HEAD:master --verbose | |
echo "Deploy completed." | |
fi | |
echo "Exiting." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment