aboutsummaryrefslogtreecommitdiff
path: root/bin/hook/README.md
blob: 4c90c7e2a02bff6cadccd2167f6e699458323e3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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.
* `post-receive`: Example [Git][] `post-receive` hook.

[sha256]: https://en.wikipedia.org/wiki/SHA-2 "SHA256"
[hmac]: https://en.wikipedia.org/wiki/HMAC "Hashed Message Authentication Code"
[git]: https://git-scm.com/ "Git version control software"