a post-receive deploy hook for snoots

a post receive deploy hook for snoots


put npx @snootclub/post-receive in your serve-side repo’s hooks/post-receive

snoot usage

for default snoot behaviour you can do something like this inside your snoot container:

  1. git init --bare /repo
  2. >/repo/hooks/post-receive cat <<.
  3. #!/bin/sh
  4. npx @snootclub/post-receive
  5. .
  6. chmod +x /repo/hooks/post-receive
  7. cd /application
  8. git remote add origin /repo
  9. git add .
  10. git push

now you’ll be able to do this on your local machine:

  1. git clone ssh://$MY_PORT/repo snoot

and when you push up any changes in snoot it will install them, build them and make them live.

advanced usage

this isn’t really specific to snoots and there are some options avaiable


the directory to use as the deployment target, where files are served from by the webserver.

default /application


the only brank acceptable to deploy from. if changes are pushed to any branch other than this, they won’t be deployed _

default master


the source bare repo directory used when deploying. by default this uses the directory the process is running from, which will be the current repo when used in a git hook :)

default process.cwd()