想写一个定时pull代码的脚本,有写过的吗?

想写一个定时pull代码的脚本,有写过的吗?

不会,应该就几行代码,有分享下的吗?


回答:

下面这个脚本可以实现在本地推送到git上后,服务器上对应服务就自动pull

https://gist.github.com/noelb...


回答:

看看我这个工具 基于github webhook的代码自动部署工具

不想暴露过多端口可用nginx 转发

location = /code-get-server {

proxy_pass http://127.0.0.1:17293;

}

然后payload url可填 http://<your-nginx-server-ip-domain>/code-get-server


回答:

使用linux的crontab么?

0 0 * * * cd yout/path && git pull

以上是 想写一个定时pull代码的脚本,有写过的吗? 的全部内容, 来源链接: utcz.com/p/937683.html

回到顶部