// DEPLOYMENTS
Automatic Git Deployments
How push-to-deploy works: webhook registration, branch matching, and what can silently block it.
When a project is created with a connected Git account, AnySites registers a webhook on the repository pointing at {api}/webhook/{github|gitlab}/{projectId}, with push events only, secured by a per-project secret.
What actually triggers a deploy
- GitHub/GitLab sends a push event to the webhook URL.
- AnySites verifies it — GitHub via an HMAC-SHA256 signature over the raw request body (
x-hub-signature-256), GitLab via a static token compared to the headerx-gitlab-token. - The pushed branch is compared to the project's
Production branch. If they don't match, the push is silently ignored — no deploy record, no error, nothing visible anywhere except the Git provider's own webhook delivery log. - If it matches and the project is
ACTIVE, a newDeploy(triggered byGIT_PUSH) is queued.
The single most common reason "I pushed and nothing happened" is a branch mismatch — you pushed to a feature branch, or the project's production branch doesn't match what you actually push to. Check both before assuming something is broken.
If the webhook was never registered
Registration happens once, at project creation, and can fail (expired Git token, insufficient scopes, network issue). If it does, the project page shows an "auto-deploy not connected" banner with the exact webhook URL. You can add it manually in your repository's webhook settings (GitHub: Settings → Webhooks; GitLab: Settings → Webhooks), using application/json, push events only.