aboutsummaryrefslogtreecommitdiff
path: root/bin/hook/README.md
blob: aebe5c6b7461baa1ae0531ebf1223f3fc3f5c583 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Webhook Scripts
===============

These scripts are used to fire and handle webhooks.

* `fire.rb`: Send `POST` request to webhook at given `HOOK_URL` webhook
  with a [SHA256][] [HMAC][] signature in `X-Hub-Signature` header.
  Configuration is handled by the `HOOK_URL` and `HOOK_HMAC_KEY`
  environment variables.
* `deploy.rb`: Verify time in from payload body (to prevent replay
  attacks), execute `git pull`, execute `hugo --minify`, and finally
  update the `htdocs` symlink.

[sha256]: https://en.wikipedia.org/wiki/SHA-2 "SHA256"
[hmac]: https://en.wikipedia.org/wiki/HMAC "Hashed Message Authentication Code"