There is any way to deploy a heroku rails app after a travis-ci success build?
Travis CI now has built-in support for deploying to Heroku: http://about.travis-ci.org/blog/2013-07-09-introducing-continuous-deployment-to-heroku/
I just implemented this case with an application of mine. It's actually not that hard to do, but it requires some steps:
.travis.yml
and get the travis_deployer.rb
script
travis encrypt your_username/your_repo HEROKU_API_KEY=<your key here>
.travis.yml
in the env -> global sectionThe travis_deployer.rb
file takes care of the ssh keys and the remote branch for heroku.
If you've performed all these steps you .travis.yml
might look like this:
env:
global:
- secure: "1u21hjnmHjkghduUIJhhs76saljlkajdlfhGhgdJgfaVtgasfLLmNBnb87dad="
after_success:
- gem install heroku
- yes | ruby travis_deployer.rb
- heroku keys:clear
- yes | heroku keys:add
- git push heroku master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With