chore: add synology auto-deploy setup
This commit is contained in:
21
deploy-staging.sh
Executable file
21
deploy-staging.sh
Executable 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"
|
||||
Reference in New Issue
Block a user