name: Deploy Server on: push: tags: - 'server-v[0-9]*.[0-9]*.[0-9]*' workflow_dispatch: concurrency: group: deploy-server cancel-in-progress: false jobs: deploy-server: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 # 直接在 runner 跑(不嵌套 docker,避免 DinD 挂载失败)。runner 镜像的 go # 若旧于 go.mod 要求(1.25.10),Go 工具链会经 GOPROXY=goproxy.cn 自动下载对应版本。 - name: Compile (Go 控制面) run: bash scripts/ci/compile-backend.sh - name: Test (go test) run: bash scripts/ci/test.sh server - name: Release → Forgejo env: FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }} FORGEJO_URL: ${{ secrets.FORGEJO_URL }} TAG: ${{ gitea.ref_name }} run: bash scripts/ci/release-server.sh "$TAG" - name: Deploy → pangolin1 env: DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }} TAG: ${{ gitea.ref_name }} run: bash scripts/ci/deploy-server.sh "$TAG"