From a026995d4e3b57b03fbcec4fa418e643e89a2d54 Mon Sep 17 00:00:00 2001 From: cpu Date: Sat, 10 May 2025 02:27:51 +0200 Subject: [PATCH] added hook script --- hooks/update.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 hooks/update.sh diff --git a/hooks/update.sh b/hooks/update.sh new file mode 100755 index 0000000..d88180a --- /dev/null +++ b/hooks/update.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e +echo "[webhook] Pulling new code..." + +cd /virt/nexus-timer || exit 1 +git pull origin main + +echo "[webhook] Building image..." +docker build -t virt-nexus-timer . + +echo "[webhook] Restarting systemd service..." +systemctl restart virt-nexus-timer.service + +echo "[webhook] Done."