From b8e490f63529b7df7ef0dc4e3f4c90a985c778b6 Mon Sep 17 00:00:00 2001 From: Hammer Date: Thu, 29 Jan 2026 22:54:46 +0000 Subject: [PATCH] feat: add deploy-to-Dokploy step in CI/CD pipeline - Deploy job runs after tests pass, only on push to main - Uses Dokploy compose.deploy API with secrets for URL, token, compose ID - PRs only run tests (no deploy) --- .gitea/workflows/ci.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index fd35160..7b37e70 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: CI/CD on: push: @@ -7,7 +7,7 @@ on: branches: [main] jobs: - test-backend: + test: runs-on: ubuntu-latest defaults: run: @@ -30,3 +30,18 @@ jobs: - name: Type check run: bun x tsc --noEmit + + deploy: + needs: test + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + + steps: + - name: Deploy to Dokploy + run: | + curl -fsSL -X POST \ + "${{ secrets.DOKPLOY_URL }}/api/compose.deploy" \ + -H "Content-Type: application/json" \ + -H "x-api-key: ${{ secrets.DOKPLOY_API_TOKEN }}" \ + -d '{"composeId": "${{ secrets.DOKPLOY_COMPOSE_ID }}"}' + echo "✅ Deploy triggered on Dokploy"