Skip to content

Instantly share code, notes, and snippets.

@camfindlay
Created August 9, 2015 07:35
Show Gist options
  • Save camfindlay/c1783fb848372bfcef3a to your computer and use it in GitHub Desktop.
Save camfindlay/c1783fb848372bfcef3a to your computer and use it in GitHub Desktop.
Git post-receive hook for simple SilverStripe deployment
#!/bin/sh
#Deploy
git --work-tree=/path/to/webroot --git-dir=/path/to/repo.git checkout -f <branch>
#Run composer and dev/build
cd /path/to/webroot
composer install --no-dev --prefer-dist
php ./framework/cli-script.php dev/build flush=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment