ci(gitea): push-to-main 自动部署到 132 + 防 GitHub CI 在 Gitea 误跑

- .gitea/workflows/deploy.yml:runner(128) 检出 → rsync 仓库到 132 → 在 132 本地
  docker compose up -d --build → 循环 curl :3000/healthz。在 132 构建、132 运行(不拿
  4 个大镜像去 128 构建);rsync 排除 .env/node_modules,不覆盖 132 上的密钥。
  Gitea secrets:DEPLOY_HOST/DEPLOY_USER/DEPLOY_PASSWORD。
- .github/workflows/ci.yml:6 个 job 加 if !contains(github.server_url,'sundynix.cn'),
  Gitea 上只跑 deploy、不误跑 GitHub CI(此前为此把 Gitea 工作流整个关了)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Blizzard
2026-07-18 14:45:24 +08:00
parent 6b45adbbd2
commit 2599936777
2 changed files with 77 additions and 1 deletions
+7 -1
View File
@@ -16,6 +16,8 @@ concurrency:
jobs:
go:
name: Go · build + vet + test
# 本 CI 只在 GitHub 跑;Gitea(git.sundynix.cn)只跑 .gitea/workflows/deploy.yml,不误跑这套。
if: ${{ !contains(github.server_url, 'sundynix.cn') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -37,7 +39,7 @@ jobs:
# 仅在 PR 跑:dev→main 的 PR 是唯一合入口,据 base 算 diff;push 到 main 不重复跑。
lint:
name: Go · golangci-lint (new issues)
if: github.event_name == 'pull_request'
if: ${{ github.event_name == 'pull_request' && !contains(github.server_url, 'sundynix.cn') }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
@@ -61,6 +63,7 @@ jobs:
# 不拿它红门,只做可见性;gitleaks(密钥泄漏)在 PR 上扫 diff,硬拦提交密钥。
security:
name: Security · govulncheck + gitleaks
if: ${{ !contains(github.server_url, 'sundynix.cn') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -86,6 +89,7 @@ jobs:
web:
name: Frontend · tsc + vitest
if: ${{ !contains(github.server_url, 'sundynix.cn') }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
@@ -111,6 +115,7 @@ jobs:
# go:embed frontend/dist 要求先出前端产物,故先 npm build。
desktop:
name: Desktop · go build + test (macOS)
if: ${{ !contains(github.server_url, 'sundynix.cn') }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
@@ -139,6 +144,7 @@ jobs:
py:
name: mcp-py · sandbox guard
if: ${{ !contains(github.server_url, 'sundynix.cn') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4