Caprover + Phabricator automatic deploy on git push

This is mostly a note to myself that documents how we can deploy stuff to cap.sealcode.org automaticall on pushing to a phabricator-hosted repository.

  1. Create a new app in captain.cap.sealcode.org (remember to enable HTTPS for it)
  2. In the Deployment tab, enable git credentials (like SSH key) that can access the repo. You will get a link to a webhook.
  3. The link is too long for fabricator (over 255 characters), so you have to shorten it. You’ll get a link like https://captain.cap.sealcode.org/api/v2/user/apps/webhooks/triggerbuild?namespace=captain&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.XXXXXXXXXXXXX.XXXXXXXX. Copy the token and remove the eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. part, as it is reduntant, and use https://pass.cap.sealcode.org/<trimmed_token> as webhook URL in the next steps
  4. Create a new webhook
  5. Create a ne Commit Herald rule that calls that webhook
  6. Should be enough!