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 master
In 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:main
To migrate db on staging (if migration isn't already included in the deploy process automatically:
heroku run rails db:migrate --remote staging
Push to Production
git push production master
heroku run rails db:migrate --remote production
Run 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 staging
On production:
heroku run rake rake_task --remote production
PreviousHerokuNextCan't push to heroku. Updates were rejected because the remote contains work you dont have locally
Last updated