diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..9fa8f73 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,28 @@ +name: Deploy + +on: + push: + tags: + - "v*.*.*" + workflow_dispatch: + +permissions: + contents: read + +jobs: + dokploy: + name: Deploy the compose service + runs-on: ubuntu-26.04 + steps: + - name: Trigger Dokploy compose deploy + env: + DOKPLOY_API_KEY: ${{ secrets.DOKPLOY_API_KEY }} + run: | + if [ -z "$DOKPLOY_API_KEY" ]; then + echo "::error::DOKPLOY_API_KEY is not set; cannot trigger the deployment." + exit 1 + fi + curl -fsS -X POST "https://dokploy.hacksubset.com/api/compose.deploy" \ + -H "x-api-key: $DOKPLOY_API_KEY" \ + -H "Content-Type: application/json" \ + -d '{"composeId":"qFd9GlvcRtYr8iYIYNwhl","title":"GitHub tag ${{ github.ref_name }}"}'