chore: add synology auto-deploy setup

This commit is contained in:
2026-03-22 09:27:14 +01:00
parent 73564f578e
commit 6b80ef55e9
3 changed files with 118 additions and 0 deletions

21
deploy-staging.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
set -euo pipefail
umask 022
ROOT="/volume2/webssd/fabiennefoehn"
LOG="$ROOT/deploy.log"
BRANCH="main"
cd "$ROOT" || exit 1
{
echo "----- $(date) -----"
whoami
echo "PATH=$PATH"
echo "Deploying branch: $BRANCH"
} >> "$LOG"
/usr/bin/git fetch origin >> "$LOG" 2>&1
/usr/bin/git reset --hard "origin/$BRANCH" >> "$LOG" 2>&1
echo "DONE" >> "$LOG"