add kb webhook
This commit is contained in:
parent
88eba07fde
commit
f28e4b1c3c
@ -1,14 +0,0 @@
|
||||
---
|
||||
title: Expect scripts
|
||||
date: 2021-11-14T15:06:57Z
|
||||
draft: false
|
||||
---
|
||||
|
||||
## collection of some expect scripts
|
||||
```
|
||||
...
|
||||
...
|
||||
tbd
|
||||
...
|
||||
...
|
||||
```
|
35
content/knowledge/webhook.md
Normal file
35
content/knowledge/webhook.md
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
title: webhook
|
||||
date: 2021-11-14T15:06:57Z
|
||||
draft: false
|
||||
---
|
||||
|
||||
# fun with webhooks
|
||||
[[webhook|https://github.com/adnanh/webhook]] is a lightweight golang single binary to easily setup webhooks for your services
|
||||
|
||||
## Examples
|
||||
### regenerate hugo
|
||||
A webhook to regenerate my hugo based website.
|
||||
Using a webhook in my gitea project, content is updated upon each git push to my remote git project.
|
||||
Details can be found in my [[ansible-role-hugo|https://git.br0tkasten.de/br0tkasten/ansible-role-hugo]]
|
||||
|
||||
/etc/webhooks.json
|
||||
```
|
||||
[
|
||||
{
|
||||
"id": "generate",
|
||||
"execute-command": "/sbin/genHugo",
|
||||
"command-working-directory": "/srv/hugo"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
/sbin/genHugo
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
cd /srv/hugo
|
||||
git pull
|
||||
HUGO_ENV="production" hugo
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user