Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

CMarzin/Heroku-Travis-Rails-deploy

Repository files navigation

README

Build Status

Example of integration an ruby app with Travis


This repo assume you already have an heroku account and an app running on it.

If not you can do it here

Basically, when you push something on master, it trigger travis and travis make all the things you tell him, (in the .travis.yml) and after run the test etc.. it deploy automatically on your app located on heroku.

Explanation of the travis file

deploy:
  provider: heroku # you don't need to change anything here
  app: # here you specify the name of your app
  api_key:
    secure: # you need to execute the command below to generate a token
  run:
  - rake db:migrate # excute the migration

Deployment instructions


Before anything make sure you have installed Heroku cli and Travis cli

  • Duplicate the .travis.example.yml and remove the example from one
  • Now open .travis.yml
  • In the travis file you need to specify the name of your app
deploy:
  provider: heroku # you don't need to change anything here
  app: # here you specify the name of your app
  api_key:
    secure: # you need to execute the command below to generate a token
  run:
  - rake db:migrate # excute the migration
  • execute this command in the terminal to get a token from heroku (in the root of the repo)
travis encrypt $(heroku auth:token) --add deploy.api_key
  • Thats it ! Now every time you push on master if the build is passing the code will be deployed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published