We have a VPS on linode, and code hosted on gitHub. How do we setup so when we push to gitHub, it also pushes automatically to our linode server. We are using PHP on the lin
You may refer to this tutorial:
Automatically Updating Your Website Using GitHub's Service Hooks:
In short it explains the following steps:
Create a php file in .git
folder on your server with the following contents.
Setup your server for the SSH keys to exist. Something like:
key. cat ~/.ssh/id_rsa.pub
Setup the service hook on GitHub . Enter WebHook URL:
http://your.domain.com/path/to/yourfile.php
When all is set. The file is going deploy all the work on your server each time you push to GitHub.