Last active
June 3, 2017 13:51
-
-
Save Demonstrandum/956413d7179732bedc7135a83204442c to your computer and use it in GitHub Desktop.
GitHub's webhooks for repositories, in PHP and sh.
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
<?php | |
header("Content-type: text/plain"); | |
if ( $_POST['payload'] ) { | |
shell_exec("./pull"); | |
} | |
?> |
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
#!/bin/sh | |
git reset --hard HEAD | |
git pull origin master # Change names if different |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment