← Docs

GitHub Webhooks

Auto-rebuild your site on every push. No manual deploys.

How It Works

When you push to the branch your site is connected to, GitHub sends a webhook payload to GetPagemark. We verify the signature, match the repo URL and branch to your site, and trigger a rebuild automatically.

Setting Up the Webhook

  1. Go to your repository on GitHub → SettingsWebhooks.
  2. Click Add webhook.
  3. Set the Payload URL to:
    https://api.getpagemark.com/webhook/github
  4. Set Content type to application/json.
  5. Set the Secret to match the GITHUB_WEBHOOK_SECRET environment variable on your GetPagemark backend.
  6. Select "Just the push event".
  7. Click Add webhook.

Disabling Auto-Build

If you don't want automatic rebuilds on every push, toggle Auto-build on push off in your site's Settings tab. The webhook will still be received but the build will be skipped.

You can always trigger a manual rebuild from the Overview tab.

Security

Webhook payloads are verified using HMAC-SHA256 signatures. Requests without a valid X-Hub-Signature-256 header are rejected with a 401 status.