Skip to content

What is Captain Hook?

What is Captain Hook?

The Short Version

Captain Hook enables a Github Pages-like push-to-deploy setup for

Installing webhooks into repositories on allows the gh-pages branch of the given repository to be hosted live on

The Long Version

Captain Hook is a Python Flask server that listens for incoming web hooks from Gitea (or Github), and uses those web hooks to deply pages to

Captain Hook works by providing a webhook endpoint (rounting provided by nginx container in pod-charlesreid1) that can be used to link a Gitea (or Github) repository to Captain Hook.

Gitea (and Github) send payloads with webhooks that specify information like the action that triggered the webhook, and the repository/branch on which the action was performed.

Captain Hook runs inside of a docker container. The docker container mounts the web directory inside the container. Generally the hook scripts will deploy the gh-apges branch to this web directory.