For example, I developed it locally, push it to GitHub, and then I have to go to the server git pull
Is there a way to simplify the process? GitHub repository automatically git pull when a push server is available.
With hooks? How to use it?
Reply content:
For example, I developed it locally, push it to GitHub, and then I have to go to the server git pull
Is there a way to simplify the process? GitHub repository automatically git pull when a push server is available.
With hooks? How to use it?
You mean automatic deployment, Webhook's work is when you push the git sends Webhook to the server you specify.
You can write this yourself, when you receive a Webhook request, the server automatically executes git pull, but the total number of its own will be a variety of problems, and there is no need to waste this time.
So the perfect solution is to use a set of automated deployment systems. I recommend using Dploy.io, fully automatic, without writing a line of code. My Code hosting coding, the server with do, each push automatic deployment, automatic restart application, great.
Method One:
Timed tasks pull once every once in a while
Method Two:
A web interface is engaged on the server, the call is automatically pull, and then the Webhook is configured on GitHub, with the address specified as the URL of this interface
Whenever you push, GitHub accesses the interface immediately.
A preliminary study on Webhook application of playing Git