aboutsummaryrefslogtreecommitdiff
path: root/bin/hook/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'bin/hook/README.md')
-rw-r--r--bin/hook/README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/hook/README.md b/bin/hook/README.md
new file mode 100644
index 0000000..aebe5c6
--- /dev/null
+++ b/bin/hook/README.md
@@ -0,0 +1,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"