update readme

This commit is contained in:
Ulf Gebhardt 2023-10-04 19:14:26 +02:00
parent b5b3959fc4
commit bed3d08b51
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -46,14 +46,52 @@ npm test
You can use the webhook template `webhook.conf.template` and the `deploy.sh` script in `.github/webhooks/` to implement an automatic deployment from a (github) webhook.
To work follow these steps (using alpine):
For this to work follow these steps (using alpine):
```bash
apk add webhook
cp .github/webhooks/webhook.conf /etc/webhook.conf
# adjust content of /etc/webhook.conf accordingly
systemctl enable webhook
systemctl start webhook
cp .github/webhooks/hooks.json.template .github/webhooks/hooks.json
vi .github/webhooks/hooks.json
# adjust content of .github/webhooks/hooks.json
# replace all variables accordingly
# copy webhook service file
cp .github/webhooks/webhook.template /etc/init.d/webhook
vi /etc/init.d/webhook
# adjust content of /etc/init.d/webhook
chmod +x /etc/init.d/webhook
service webhook start
rc-update add webhook boot
vi /etc/nginx/http.d/default.conf
# adjust the nginx config
# location /hooks/ {
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection 'upgrade';
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header Host $host;
#
# proxy_pass http://127.0.0.1:9000/hooks/;
# proxy_redirect off;
#
# #access_log $LOG_PATH/nginx-access.hooks.log hooks_log;
# #error_log $LOG_PATH/nginx-error.backend.hook.log warn;
# }
```
For the github webhook configure the following:
| Field | Value |
|------------------------------------------------------|-------------------------------|
| Payload URL | https://it4c.dev/hooks/github |
| Content type | application/json |
| Secret | A SECRET |
| SSL verification | Enable SSL verification |
| Which events would you like to trigger this webhook? | Send me everything. |
| Active | [x] |
## How it works
This repository utilizes `vuepress-deploy` to automatically deploy the current `master` branch to github pages.