-
-
Save benoitr/e5fa43703218f7fead5c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
read -r -p "Confirm deployment to PRODUCTION? Type 'yes' to continue " response | |
if [[ $response == "yes" ]] | |
then | |
# Precompile assets and commit to github | |
bundle exec rake assets:precompile RAILS_ENV=production | |
git add . | |
git commit -m 'recompiling assets' | |
git push origin master | |
# Push to heroku | |
git push heroku master | |
# Run migrations | |
heroku run rake db:migrate --app my-app | |
# Do whatever you need with your app (seeds, data, etc..) | |
# Restart app | |
heroku restart --app my-app | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment