No description
| etc | ||
| usr/local/bin | ||
| LICENSE | ||
| README.md | ||
webhookd-update
Use webhookd behind basic auth to listen for github push events and run a script to fetch latest commit and do something afterwards.
First:
- pick a basic auth password and write it down
- pick a github push secret and write it down
On the server:
- clone github repo into
/root/site - install ncarlier/webhookd to
/usr/local/bin/webhookd - copy files from this repo's
etcandusrdirectory to/etcresp./usr - run
htpasswd /etc/webhookd/htpasswd gitpushwith secret from step 1 - in
/etc/systemd/system/webhookd.service, setEnvironment=GITHUB_SECRET=xxxto secret from step 2 - add custom scripting in
/usr/local/bin/update-site - run
systemctl daemon-reload - run
systemctl enable webhookd - run
systemctl start webhookd
Setup webhook in GitHub:
- url:
http://gitpush:<basicauthpassword><server-addr>:9999/github - secret: secret from step 2
- trigger: just the push event