Deploying a Phoenix (Elixir) App to Gigalixir using Travis CI

Elixir
script:
- mix test && ./deploy.sh
#!/usr/bin/env bashgit remote add gigalixir https://$GIGALIXIR_EMAIL:$GIGALIXIR_API_KEY@git.gigalixir.com/$GIGALIXIR_APP_NAME.gitif [ "$TRAVIS_BRANCH" == "master" ]; then
echo "Pushing HEAD to master branch on Gigalixir."
git push gigalixir HEAD:master --verbose
echo "Deploy completed."
fi
echo "Exiting."
#!/usr/bin/env bashgit remote add gigalixir https://$GIGALIXIR_EMAIL:$GIGALIXIR_API_KEY@git.gigalixir.com/$GIGALIXIR_APP_NAME.gitBRANCH=$(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."

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sayo Ogunlegan

Sayo Ogunlegan

More from Medium

Elixir logging to (multiple) file(s) using metadata_filter

Mailing a Postcard with JavaScript– Part 2: Working With Addresses and Templates

How to Build a JSON RESTful API with Neo4j, PHP, and OpenAPI

Building an Income per Day SVG Chart in Elixir with ContEx Library