Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// Use in the "Post-Receive URLs" section of your GitHub repo.
if ( $_POST['payload'] ) {
$data = json_decode($_POST['payload']);
if ($data->ref == 'refs/heads/master') {
shell_exec( 'cd /home/YOURNAME/webapps/WEBAPPNAME && git pull' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.