Easy script to auto-pull latest code from github repo. This is tested and functional on MediaTemple's (gs) hosting platform.
- SSH to your server
- Remove default /html/ directory
rm -rf html - Clone your repo from github
git clone [email protected]:[username]/[reponame].git- if you are asked for an SSH password, you need to edit your key to not require one. - Make the new directory your web root
cd .., mv [reponame] html - Upload
/webhook-deploy/to your root - Add
webhook-deployto .gitignore - In github, go to Repository Settings -> Service Hooks -> WebHook URLs and add
http://domain.com/webhook-deploy/auto.php