api
Webhooks
Configure GitHub webhooks for automatic deployments.
Webhooks#
Runix uses GitHub webhooks to automatically redeploy services when you push code. Runix matches by repository + tracked branch, and can trigger multiple services if they share the same repo/branch.
How it works#
You push code to GitHub
Any push to the branch your deployment tracks (usually main) triggers webhook processing. Pushes to other branches are ignored for that deployment.
GitHub sends a webhook to Runix
GitHub sends a POST request to https://api.runix.dev/webhooks/github with details about the push event.
Runix starts a new build
Runix verifies the signature, deduplicates delivery IDs, matches all deployments for that repo+branch, and triggers rebuilds for each match with auto-deploy enabled.
Your service is updated
Once the build completes, Runix swaps the old container with the new one. Zero downtime.
Webhook endpoint#
/webhooks/githubReceives GitHub events (ping, push, pull_request). This endpoint is called by GitHub, not by you. It verifies the webhook signature, deduplicates deliveries, branch-matches deployments, triggers redeploys, and syncs preview metadata for PR events.
X-Hub-Signature-256headerrequiredGitHub HMAC signature for payload verificationYou do not need to call this endpoint directly. Runix attempts to configure the GitHub webhook automatically; if setup fails, deployment still succeeds and the response includes a warning.
Troubleshooting webhooks#
- Push not triggering deploy? Check that the webhook is active in your GitHub repo settings (Settings > Webhooks).
- Wrong branch deploying? Make sure your deployment is configured to track the correct branch.
- Webhook deliveries failing? Check the "Recent Deliveries" tab in GitHub webhook settings for error details.
- Multiple deploys on one push? This usually means you have duplicate webhooks. Remove extras from GitHub.