How do github hooks have push server auto pull?

Source: Internet
Author: User
Tags webhook
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

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.