Last active
December 6, 2017 14:20
-
-
Save b1ackmartian/1eebc64e8904aa5655e1766cb1c41aca 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