Skip to content

Deployment

Mikaeljlj edited this page Sep 27, 2017 · 11 revisions

Guide to deployment on heroku

Requirements:

if you are using ssh options for git, you will need to upload your public ssh key to your heroku account

First Time setup

Remove A line from the gitignore to include production folder

sed -i.bak '/public\/dist\//d' ./.gitignore  # remove public/dist/ line in gitignore

Deployment using git:

git pull origin master
// Switch to temporary live branch for upload, if no local live branch is present, 
the option -b is needed
git checkout live
// Merge the bug fix to the live branch we switched to
git merge <branch to merge from> 
grunt build 
git add -A
git commit -m 'public dist'
//Push live branch to heroku master branch
git push heroku -f live:master
 // jump back to development branch 
git checkout master

If this is the first time you are pushing to heroku you may need to add heroku to as a remote location:

Check which remote locations are available:

git remote -v
git remote add heroku git@heroku.com:<projectname>.git

In this case the project name is arkadrecruitment.

Troubleshooting

If your build does not work, there are some areas that can display useful information:

  • View logs
    • Option is available in the project dashboard on heroku
  • Heroku command line
    • heroku run bash
      • This command opens a bash shell in heroku project, where you are greeted with a root directory with the project
Clone this wiki locally