Created
September 13, 2015 09:21
-
-
Save negatronGister/471712a6563f7c6a2eff to your computer and use it in GitHub Desktop.
Git post-receive hook for deploying on webfaction
This file contains hidden or 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
# *** INSTRUCTIONS ******** | |
# $ cd repo.git | |
# $ cat > hooks/post-receive | |
# paste this | |
# Ctrl+D | |
# chmod +x hooks/post-receive | |
# *************************** | |
#!/bin/sh | |
GIT_WORK_TREE=/home/USERNAME/webapps/APPNAME/app git checkout -f master | |
GIT_WORK_TREE=/home/USERNAME/webapps/APPNAME/app git reset --hard | |
/home/USERNAME/webapps/APPNAME/bin/stop | |
/home/USERNAME/webapps/APPNAME/bin/start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment