node.js - 在nodejs环境中如何配置webhook以实现hexo博客的自动更新?
大家讲道理
大家讲道理 2017-04-17 16:20:51
0
3
701
大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(3)
左手右手慢动作

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.

左手右手慢动作

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

黄舟

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template