a post receive deploy hook for snoots
put npx @snootclub/post-receive
in your serve-side repo's hooks/post-receive
for default snoot behaviour you can do something like this inside your snoot container:
git init --bare /repo
>/repo/hooks/post-receive cat <<.
#!/bin/sh
npx @snootclub/post-receive
.
chmod +x /repo/hooks/post-receive
cd /application
git remote add origin /repo
git add .
git push
now you'll be able to do this on your local machine:
git clone ssh://snoot.club:$MY_PORT/repo snoot
and when you push up any changes in snoot
it will install them,
build them and make them live.
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()