From a5a8b04bc0e5a60374f106993ed80cda16014e61 Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar Date: Thu, 19 Feb 2026 10:17:34 +0100 Subject: [PATCH] ci: add deploy stage to trigger Coolify after CI passes Deploy job runs only on main branch after all quality checks and tests succeed, replacing the immediate push webhook with a gated deployment. Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 5d3311f..d768d9f 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -95,3 +95,20 @@ jobs: - name: Run tests (web) run: cargo test --features web --no-default-features + # --------------------------------------------------------------------------- + # Stage 3: Deploy (only after tests pass, only on main) + # --------------------------------------------------------------------------- + deploy: + name: Deploy + runs-on: docker + needs: [test] + if: github.ref == 'refs/heads/main' + container: + image: alpine:latest + steps: + - name: Trigger Coolify deploy + run: | + apk add --no-cache curl + curl -sf "${{ secrets.COOLIFY_WEBHOOK }}" \ + -H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}" +