Add it to your Gemfile (inside development group)
gem 'heroku_tasks', :git => 'git://github.com/thibaudgg/heroku_tasks.git'
Setup staging/production branch (here from remote)
git checkout -t origin/production git checkout -t origin/staging
Create config/heroku.yml file and edit it
rails generate heroku_tasks:config
Merge your last work in staging branch
git checkout staging git pull origin staging git merge master
Regenerate your assets if you’re using Jammit (and you should)
rake deploy:assets
Push your code to staging heroku app
rake deploy:staging or rake deploy:staging:migrations
If your staging app is still alive
git push origin staging git checkout production git pull origin production git merge staging
Activate maintenance page on production and wait for it (Optional, ie. with migrations)
heroku maintenance:on --app production_app
Push your code to production app
rake deploy:production or rake deploy:production:migrations
Don’t forget to remove maintenance page if needed
heroku maintenance:off --app production_app
Back to work (after some rest!)
git push origin production git checkout master git merge production git push origin master
If you met any problems
rake deploy:staging:rollback or rake deploy:production:rollback