From 3e345e9e225ff345221bbcbe2472c79451fb64cf Mon Sep 17 00:00:00 2001 From: yiqiu Date: Thu, 20 Nov 2025 22:09:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=87=AA=E5=8A=A8=E5=8C=96?= =?UTF-8?q?=E9=97=AE=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9cb844c..a9c8d26 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,12 +9,14 @@ platform: steps: - name: Pull latest code from Gitea commands: + # 添加 safe.directory,解决 Git “dubious ownership” 报错 + - git config --global --add safe.directory /www/wwwroot/hgdemo.hgidc.cn/public/web/BlackFruit-web + - cd /www/wwwroot/hgdemo.hgidc.cn/public/web/BlackFruit-web - - if [ ! -d .git ]; then - git clone https://yiqiu:***@gitea.ycyaw.com/yiqiu/BlackFruit-UI.git .; - else - git pull; - fi + + # 判断是否已有 .git,没有就 clone,有就 pull + - if [ ! -d .git ]; then git clone https://yiqiu:***@gitea.ycyaw.com/yiqiu/BlackFruit-UI.git .; else git pull; fi + - ls -l - name: Restart Nginx