2023-05-19 08:07:36 +02:00

786 B

title, menu
title menu
webhook
main
parent
Linux

fun with webhooks

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

/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