Skip to content

Instantly share code, notes, and snippets.

@frankmt
Created February 4, 2014 22:06
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save frankmt/8813291 to your computer and use it in GitHub Desktop.
Save frankmt/8813291 to your computer and use it in GitHub Desktop.
Script - Spree deployment with asset recompilation
#!/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
@amejiarosario
Copy link

Thank you!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment