How do I Configure Automatic push server pull for github hooks?

Source: Internet
Author: User
Tags webhook
For example, if I develop locally and push it to github, then I have to go to the server to gitpull. Is there a way to simplify this process? The github repository automatically uses hooks when there is a push server? How to use it? For example, if I develop locally and push it to github, I have to go to git pull on the server.

Is there a way to simplify this process? The github repository automatically uses git pull as soon as the push server is available.

Using hooks? How to use it?

Reply content:

For example, if I develop it locally and push it to github, I have to go to git pull on the server.

Is there a way to simplify this process? The github repository automatically uses git pull as soon as the push server is available.

Using hooks? How to use it?

You mean automatic deployment. The webhook process is to send the webhook to your designated server by git when you push it.

You can write this item on your own. When you receive a webhook request, the server automatically executes git pull, but the total number of writes by yourself may cause various problems and you do not need to waste the time.

Therefore, the perfect solution is to use an automatic deployment system. I recommend that you use dploy. io, which is fully automatic and does not need to write a line of code. Coding for code hosting, do for servers, automatic deployment for each push, and automatic application restart, great.

Method 1:

The scheduled task is pull at intervals.

Method 2:

Create a web interface on the server, automatically use pull during the call, and configure webhook on github. The address is specified as the url of this interface.

Every time you push, github will immediately access this interface.

A Preliminary Study on git webhook Application

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.