This commit is contained in:
2024-05-18 13:20:28 +02:00
parent 2758299bee
commit a025ef4425
5 changed files with 26 additions and 2 deletions

7
files/etc/webhooks.json Normal file
View File

@ -0,0 +1,7 @@
[
{
"id": "generate",
"execute-command": "/sbin/genHugo",
"command-working-directory": "/srv/hugo"
}
]

View File

@ -1,3 +1,3 @@
#!/sbin/openrc-run
command=/srv/hugo/generate.sh
command=/sbin/genHugo

View File

@ -2,5 +2,5 @@
pidfile="/run/$RC_SVCNAME.pid"
command="/usr/bin/webhook"
command_args="-hooks /srv/hugo/hooks.json -verbose"
command_args="-hooks /etc/webhooks.json -verbose"
command_background="yes"

5
files/sbin/genHugo Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
cd /srv/hugo
git pull
HUGO_ENV="production" hugo