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"