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: |