PHP WebHOOK for pulling a repository upon a commit.
To automatically update a staging server when a new commit is made.
Untested
-
Clone your target repostiry in directory x.
-
Create a config.ini with sections for each local repository to pull set the path variable to x.
[myrepox]
path = x
-
Setup a webserver on which the hook is server. I recommend restricting the allowed remote IPs to those used by GitHub.
-
Go to your repository settings on GitHub and add the URL to your hosted deploy.php.