Skip to content

Instantly share code, notes, and snippets.

@jhbruhn
Created July 26, 2014 15:30
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 jhbruhn/a1a66d505324d635170a to your computer and use it in GitHub Desktop.
Save jhbruhn/a1a66d505324d635170a to your computer and use it in GitHub Desktop.
Pedas PostReceive
#!/bin/bash -l
GIT_REPO=$HOME/website.git
TMP_GIT_CLONE=$HOME/tmp/git/website
PUBLIC_WWW=/var/www/virtual/$USER/html
DIR=`pwd`
unset GIT_DIR
#rm -rf $TMP_GIT_CLONE
. $HOME/.bash_profile
git clone $GIT_REPO $TMP_GIT_CLONE
cd $TMP_GIT_CLONE
git status
git pull
bower install
npm install
grunt build
rsync -av --delete $TMP_GIT_CLONE/dist/ $PUBLIC_WWW
cd $DIR
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment