Push to Heroku
Assuming you have already set up and renamed your heroku remotes, use these to push to staging and production:
Push to Staging
git push staging masterIn cases where we have a staging branch that we want to push to the staging app on heroku, use this command instead:
git push staging staging:mainTo migrate db on staging (if migration isn't already included in the deploy process automatically:
heroku run rails db:migrate --remote stagingPush to Production
git push production masterheroku run rails db:migrate --remote productionRun rake tasks (if any)
If a rake task was created for this push (for example task_name.rake), then run it on heroku like this:
On staging:
heroku run rake rake_task --remote stagingOn production:
heroku run rake rake_task --remote productionPreviousHerokuNextCan't push to heroku. Updates were rejected because the remote contains work you dont have locally
Last updated