aboutsummaryrefslogtreecommitdiff
path: root/bin/hook/README.md
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2021-10-17 16:44:32 -0400
committerPaul Duncan <pabs@pablotron.org>2021-10-17 16:44:32 -0400
commite2622959a2234c7679c5c3eb18ba8642a1ce3a13 (patch)
treeb2dcb9c60428c6300bfee80ede56327053bf9a71 /bin/hook/README.md
parent031056a3d398daa007258664f67fb90f77edba8b (diff)
downloadpablotron.org-e2622959a2234c7679c5c3eb18ba8642a1ce3a13.tar.bz2
pablotron.org-e2622959a2234c7679c5c3eb18ba8642a1ce3a13.zip
add bin/hook
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"