Last active
March 1, 2017 00:27
-
-
Save toddsby/9b2e26ab6c510d2f38ca04a533e62527 to your computer and use it in GitHub Desktop.
Git deploy post-receive hook (production)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while read oldrev newrev refname | |
do | |
branch=$(git rev-parse --symbolic --abbrev-ref $refname 2> /dev/null) | |
if [ "master" = "$branch" ]; then | |
(cd /home/tufandr/public_html/mightty && git --git-dir /home/tufandr/repos/mightty/.git --work-tree /home/tufandr/public_html/mightty checkout master -f && yarn && node_modules/.bin/gulp && node_modules/.bin/gulp 6to5ifyProd) | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment