Skip to content

Instantly share code, notes, and snippets.

@bitIO
Created November 3, 2015 15:24
Show Gist options
  • Save bitIO/26fb427cee52d0377e37 to your computer and use it in GitHub Desktop.
Save bitIO/26fb427cee52d0377e37 to your computer and use it in GitHub Desktop.
Git hook used on my Digital Ocean droplet to deploy automatically my local Ghost installation (requires a local git repository in the droplet)
#!/bin/sh
git --work-tree=/var/www/ghost --git-dir=/root/repository/ checkout -f
cd /var/www/ghost
chown -R ghost:ghost *
npm install --production
cd content/data
rm ghost.db
ln -s ghost-dev.db ghost.db
service ghost restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment