夜间模式暗黑模式
字体
阴影
滤镜
圆角
主题色
自动部署 webhook

在github中webhook中添加自己的回调接口然后处理github发过来的请求python代码如下:

import web
from subprocess import call
path = '/home/wwwroot/default/testsmirk.github.io'
git_path = 'https://github.com/TestSmirk/testsmirk.github.io.git'
urls = (
    '/(.*)', 'hello'
)
app = web.application(urls, globals())
class hello:
    def POST(self, name):
        call(['cd "' + path + '" && git pull '+git_path], shell=True)
if __name__ == "__main__":
    app.run()
暂无评论

发送评论 编辑评论


				
上一篇
下一篇