Created
September 12, 2012 15:54
-
-
Save pawel-dubiel/3707633 to your computer and use it in GitHub Desktop.
GitHub automatic deployment #github
This file contains 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
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