GuidesAuto-deploy from GitHub
Test the endpoint
Sign a request with your secret to test the webhook endpoint with no push.
GitHub computes a signature from the raw body and the secret.
1 / 4
GitHub signs each delivery with X-Hub-Signature-256: sha256=<hex HMAC-SHA256 of the raw body>. This signature is an HMAC. You can sign a request yourself to test your setup.
Send a signed ping
SECRET='the secret'
BODY='{"zen":"Keep it logically awesome."}'
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$SECRET" | awk '{print $2}')
curl -s https://ferry.apps.example.com/hooks/github \
-H 'Content-Type: application/json' -H 'X-GitHub-Event: ping' \
-H "X-Hub-Signature-256: sha256=$SIG" -d "$BODY"
# {"ok":true}The answers
| Answer | Meaning |
|---|---|
200 {"ok":true} | A signed ping: the secret matches. |
200 {"deploys":[…]} | Ferry processed a push. An empty list means that no service matched. |
200 {"deploys":[],"ignored":true,"reason":"…"} | A replayed or duplicate delivery. |
401 invalid or missing X-Hub-Signature-256 | The secret is different, or the request is not from GitHub. |
404 | The server has no webhook secret. |
413 | The payload is larger than 25 MiB. |
If a push deploys nothing
Compare the repository URL and the branch of the service with the push:
ferry show apiMake sure that auto-deploy is on. Make sure that you did not suspend the service.