Created
June 3, 2014 10:55
-
-
Save chefe/06bdfb5f5345a74670cb to your computer and use it in GitHub Desktop.
post-receive hook for generating a webpage
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 ref | |
do | |
branch=`echo $ref | cut -d/ -f3` | |
git archive --format=tar --prefix=$branch/ $branch | (cd ../web && tar xf -) | |
echo "The page for $branch was successfully updated" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment