Skip to content

Deployment

fridlund edited this page Mar 2, 2020 · 2 revisions

Deployment is made easy because of the Travis and git integration.

Set up Travis CI with Heroku

Looking at the tree, we can see that a .yml-file is found at the root.

recruitment ├─ .travis.yml

This file provides us with all of the configuration we need to deploy our website. Our .travis.yml looks like this

language: java
install: true
deploy:
        provider: heroku
        api_key:
                secure: ********-****-****-****-************
        app: app-name

Where the secure: key is the key provided by Heroku. To reveal your api_key for the project you need to use the Heroku CLI (if you are not logged in you need to do that first, see Get Started).

$ heroku auth:token

When you now push to your git-repo, it will automatically build and deploy the project. OBS Travis will only deploy when pushing to master branch.

Clone this wiki locally