Files
kennethreitz 17e2a8ecd1 Fix Dokploy deploy trigger: send push-event payload
The deploy endpoint silently no-ops on a bare POST; it needs the
x-github-event header and a ref to match the configured branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 00:20:23 -04:00

39 lines
1.1 KiB
YAML

# Deploys to the Dokploy instance on mercury (mercury.kennethreitz.org)
# by hitting the application's deploy webhook after tests pass.
name: Deploy
on:
push:
branches: [main]
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- run: uv python install 3.13
- run: uv sync --extra dev
- run: uv run pytest tests/ -n auto --tb=short
deploy:
name: Deploy app
runs-on: ubuntu-latest
needs: test
environment: prod
concurrency: deploy-group
steps:
- name: Trigger Dokploy deploy
# Dokploy's deploy endpoint expects a GitHub-style push event;
# a bare POST returns 200 but deploys nothing.
run: |
curl -fsS -X POST "$DOKPLOY_DEPLOY_URL" \
-H 'Content-Type: application/json' \
-H 'x-github-event: push' \
-d "{\"ref\":\"refs/heads/${GITHUB_REF_NAME}\"}"
env:
DOKPLOY_DEPLOY_URL: ${{ secrets.DOKPLOY_DEPLOY_URL }}