From 33263bc3c7b1633f435ff6af3e3ab7d6f7d78ac4 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 10 Oct 2026 16:36:49 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E9=83=A8=E7=BD=B2=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E6=94=B9=E4=B8=BA=E7=9B=B4=E6=8E=A5=20clone=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E4=BE=9D=E8=B5=96=20github=20=E4=B8=8A=E7=9A=84=20act?= =?UTF-8?q?ion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 0e5a2e4..28bdf06 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -1,7 +1,10 @@ name: deploy-digital-me -# 推送到 main → 自动同步代码到 NAS 并重新构建、重启容器 +# 推送到 main → 自动同步代码到 NAS、重新构建并重启容器 # 目标:http://192.168.110.4:8090 +# +# 说明:本工作流不使用任何外部 action(如 actions/checkout), +# 直接用 Gitea 内置地址 clone,避免因访问 github.com 不稳定而失败。 on: push: @@ -13,9 +16,14 @@ jobs: runs-on: ubuntu-latest env: TZ: Asia/Shanghai + GITEA_URL: http://192.168.110.4:3000 + REPO_PATH: admin/digital-me-history steps: - - name: 拉取代码 - uses: actions/checkout@v4 + - name: 拉取代码(直接从 Gitea,不依赖 github) + run: | + set -e + git config --global --add safe.directory '*' + git clone --depth 1 "${GITEA_URL}/${REPO_PATH}.git" . - name: 拉取 Git LFS 大文件 run: |