Skip to content

Instantly share code, notes, and snippets.

@pawel-dubiel
Created September 12, 2012 15:54
Show Gist options
  • Save pawel-dubiel/3707633 to your computer and use it in GitHub Desktop.
Save pawel-dubiel/3707633 to your computer and use it in GitHub Desktop.
GitHub automatic deployment #github
try
{
$payload = json_decode($_REQUEST['payload']);
}
catch(Exception $e)
{
exit(0);
}
file_put_contents('logs/github.txt', print_r($payload, TRUE), FILE_APPEND);
if ($payload->ref === 'refs/heads/master')
{
exec('./build.sh');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment