Skip to content

Instantly share code, notes, and snippets.

@camfindlay
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save camfindlay/4041dfd154e0d176cd81 to your computer and use it in GitHub Desktop.
Save camfindlay/4041dfd154e0d176cd81 to your computer and use it in GitHub Desktop.
Simple deploy script for SilverStripe
#/bin/sh
# Requires: git, composer, sspak, php
echo "Taking a backup"
d=$(date +%Y%m%d%H%M%S)
sspak save /home/bitnami/htdocs ~/backup/$d.sspak
cd ~/htdocs
git fetch
echo "Deploying production release branch"
git pull origin production
echo "Run composer and dev/build"
sudo composer selfupdate
composer install --no-dev --prefer-dist
php ./framework/cli-script.php dev/build flush=1
echo "Deployment complete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment