The part which is complex is the webhook on GitHub Every GitHub repository has the option to communicate with a web server whenever the repository is pushed to. That means your web site must have a process listening to those JSON messages sent by GitHub upon reception of a commit. You can see multiple examples of those listeners, like this webhook-deployer, with an auto.php (for a php server): <?php
// Prevent accidental XSS
header("Content-type: text/plain");
// Run the script
if ( $_POST['payload'] ) {
shell_exec("./pull.sh");
}That GitHub project recommends an SSH key with no passphrase, which I agree at first (to test it out). However, especially for private projects, it is best to run an ssh-agent and manage an ssh key passphrase protected. Hopefully that helps you out.