Skip to content

Instantly share code, notes, and snippets.

@JarLowrey
Last active March 12, 2016 21:39
Show Gist options
  • Save JarLowrey/c6d97c22b0a76e7fb38c to your computer and use it in GitHub Desktop.
Save JarLowrey/c6d97c22b0a76e7fb38c to your computer and use it in GitHub Desktop.
script to update rails website from a Git repo on a Digital Ocean 1-click Rails server
#!/bin/sh
echo $0
#go to UACT website directory
cd ~rails/UACT
#update repo
git pull origin master
#compile new assets
RAILS_ENV=production rake db:seed
RAILS_ENV=production rake assets:precompile
#restart servers
service unicorn restart
service nginx reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment