Travis integration... with Heroku. - Hives/acebook-business-logic GitHub Wiki

Creating the CI (continuous integration) with Travis requires us to add the encrypted api key to the .travis.yml file.

If you have both the Heroku and Travis CI command line clients installed, you can get your key, encrypt it and add it to your .travis.yml by running the following command from your project directory:

travis encrypt $(heroku auth:token) --add deploy.api_key

travis command defaults to using travis-ci.org as the API endpoint. If your build runs on on travis-ci.com (even if your repository is public), add --pro flag to override this:

travis encrypt $(heroku auth:token) --add deploy.api_key --pro

i.e. in this case we are looking for the following code (with API key) within the .travis.yml file.

language: ruby rvm:

  • 2.2
  • jruby

deploy: provider: heroku api_key: secure: "YOUR ENCRYPTED API KEY"