Skip to content

Instantly share code, notes, and snippets.

@sherbrow
Created February 19, 2017 20:29
Show Gist options
  • Save sherbrow/57f0187a7ba5292b391f98f300eb801f to your computer and use it in GitHub Desktop.
Save sherbrow/57f0187a7ba5292b391f98f300eb801f to your computer and use it in GitHub Desktop.
post-receive deploy hook
#!/bin/sh
DEPLOY_TO=/var/www/labs.sherbrow.fr/
BRANCH=master
git --work-tree=$DEPLOY_TO --git-dir=./ checkout $BRANCH -f || exit 1
echo "Deploying to "$DEPLOY_TO" ("$BRANCH")" || exit 2
composer install -d $DEPLOY_TO --quiet --no-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment