search

Home  >  Q&A  >  body text

node.js - 在nodejs环境中如何配置webhook以实现hexo博客的自动更新?

大家讲道理大家讲道理2782 days ago618

reply all(3)I'll reply

  • ringa_lee

    ringa_lee2017-04-17 16:22:51

    Since you have a server (Tencent Cloud), there is no need to host it on Github.
    If you install a hexo-admin on the server, you can publish articles directly to the server locally.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 16:22:51

    Actually, I don’t quite understand the meaning of the question.
    If you access hexo on Tencent Cloud and host the code on github, you want to edit the article locally and then push it to github. Finally, github's webhook will automatically pull it to Tencent Cloud to remotely manage hexo. ?
    The function of webhook is to automatically access a web address when there are changes in the warehouse
    Then the web side executes commands such as git pull on the server
    You can use nodejs to set up an http service to call back to github, and then call it in nodejs Execute system command or shell script to update the automatic pull warehouse

    reply
    0
  • 黄舟

    黄舟2017-04-17 16:22:51

    https://github.com/merrynode/...
    I have written a simple automatic deployment before, you can refer to it.

    reply
    0
  • Cancelreply