宝塔WebHook自动部署-Gogs

  1. gogs web钩子
  2. webhook shell

gogs web钩子

http://111.111.111.111:123/hook?access_key=asdansdasdasdasdasfasd&param=master

webhook shell

#!/bin/bash

#git项目路径
gitPath="/www/wwwroot/payment"


echo "开始拉取Git 路径:$gitPath"
cd $gitPath

#拉取最新的项目文件
git reset --hard origin/master
git pull
chown -R www:www $gitPath

echo "End"
exit

服务器进入文件
vi .git/config
加上

[credential]
    helper = store

转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 lzdong@foxmail.com

×

喜欢就点赞,疼爱就打赏