Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically Deploy From GitHub To Server On Push

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 Linode server.

like image 283
Justin Avatar asked Sep 05 '11 02:09

Justin


People also ask

Can you deploy from GitHub?

Scrapy Cloud supports automatic and manual deploys from GitHub repositories. You can hook a GitHub repository with your Scrapy Cloud project and configure it so that a new deploy is triggered every time you push a changeset to your remote repo.


1 Answers

You probably want to use GitHub's post-receive hooks.

In summary, GitHub will POST to a supplied URL when someone pushes to the repo. Just write a short PHP script to run on your linode VPS and pull from GitHub when it receives said POST.

like image 86
Kristian Glass Avatar answered Oct 09 '22 22:10

Kristian Glass