From bb5bdc297d0de20828471347a624745ace49930c Mon Sep 17 00:00:00 2001 From: m0onmo0n Date: Sun, 12 Apr 2026 18:17:18 +0200 Subject: [PATCH] Add automation --- update-site.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 update-site.sh diff --git a/update-site.sh b/update-site.sh new file mode 100755 index 0000000..3fd3bb6 --- /dev/null +++ b/update-site.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -e + +cd /home/prodesk/live-site + +git fetch origin main + +LOCAL=$(git rev-parse HEAD) +REMOTE=$(git rev-parse origin/main) + +if [ "$LOCAL" != "$REMOTE" ]; then + echo "$(date): Updates found, pulling..." + git pull origin main + + echo "$(date): Restarting docker container..." + docker restart 49cf803425d2 + + echo "$(date): Update complete." +else + echo "$(date): No updates." +fi