Auto-Deploy on Push

ServerPlane can automatically deploy your app whenever you push code to the configured branch on GitHub. This is powered by GitHub webhooks and is enabled by default when you connect a repository.

How It Works

  1. When you connect a repository, ServerPlane registers a webhook on your GitHub repo that listens for push events.
  2. Each time you push to the configured branch (e.g., main), GitHub sends a notification to ServerPlane.
  3. ServerPlane verifies the authenticity of the request using a secure signature check.
  4. If the request is valid and the push is to the configured branch, a deployment is queued automatically.
  5. The deployment pulls the latest code, runs your build and deploy commands, and restarts the app.

Pushes to other branches are ignored. Only pushes matching the app's configured branch trigger a deploy.

Enabling and Disabling Auto-Deploy

  1. Open your app's detail page and go to the Git & Deploy tab.
  2. In the Deploy section, find the Auto-deploy on push toggle.
  3. Click the toggle to enable or disable it. The change takes effect immediately.

When disabled, the webhook remains registered on GitHub but ServerPlane will not trigger deployments from incoming push events. You can still deploy manually using the Deploy Now button.

Webhook Details

  • Events: push only.
  • Security: Each webhook has a unique secret generated per app. Incoming requests are verified using a cryptographic signature to prevent tampering.
  • SSL: Webhook requests require a valid SSL certificate.

Webhook Lifecycle

  • Created automatically when you connect a repository to an app.
  • Deleted automatically when you disconnect the repository.
  • The webhook is registered per-app, so multiple apps can be connected to the same repository on different branches.

Troubleshooting

  • Pushes not triggering deploys — Check that auto-deploy is enabled (toggle should be active). Verify you are pushing to the correct branch.
  • Signature mismatch errors — These are logged on the server. If you see them, disconnect and reconnect the repository to regenerate the webhook secret.
  • Multiple apps on the same repo — Each app has its own webhook secret. A single push can trigger deploys for multiple apps if they are connected to the same repo and branch.