fix: drone 部署改用 git reset --hard 避免本地改动冲突
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2026-03-18 17:46:01 +08:00
parent f5b2225bd8
commit cc141973a5

View File

@@ -14,8 +14,8 @@ steps:
- cd /www/wwwroot/hgdemo.hgidc.cn/public/web/BlackFruit-web
# 判断是否已有 .git没有就 clone有就 pull
- if [ ! -d .git ]; then git clone https://yiqiu:***@gitea.ycyaw.com/yiqiu/BlackFruit-UI.git .; else git pull; fi
# 判断是否已有 .git没有就 clone有就强制同步远程最新代码
- if [ ! -d .git ]; then git clone https://yiqiu:***@gitea.ycyaw.com/yiqiu/BlackFruit-UI.git .; else git fetch --all && git reset --hard origin/main; fi
- ls -l