Skip to content

Instantly share code, notes, and snippets.

@jt
Created August 23, 2011 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jt/1165326 to your computer and use it in GitHub Desktop.
Save jt/1165326 to your computer and use it in GitHub Desktop.
Heroku deploy script
namespace :deploy do
desc 'Deploy to staging'
task :staging do
push_to('johmas-staging')
`heroku run rake db:populate --app johmas-staging`
end
desc 'Deploy to production'
task :production do
push_to('johmas')
end
end
def push_to(app)
`git checkout master`
`git push -f git@heroku.com:#{app}.git`
`heroku run rake db:migrate --app #{app}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment