2 Commits

Author SHA1 Message Date
IGNY8 VPS (Salman)
2b753894f0 Merge branch 'main' of https://git.igny8.com/salman/igny8 2025-11-10 11:43:46 +00:00
IGNY8 VPS (Salman)
17801c2ab7 Enhance git-pull script with logging and safe directory configuration 2025-11-10 11:43:43 +00:00

View File

@@ -1,7 +1,13 @@
#!/bin/bash
# Simple git pull script for webhook
cd /data/app/igny8
git pull origin main
git update-ref refs/remotes/origin/main HEAD
# Git pull triggered by Gitea webhook
LOG_FILE="/tmp/git-pull.log"
{
echo "$(date '+%Y-%m-%d %H:%M:%S') - Git pull started"
cd /data/app/igny8 || exit 0
git config --global --add safe.directory /data/app/igny8 2>/dev/null || true
git config --global --add safe.directory /data/app/igny8/backend 2>/dev/null || true
git config --global --add safe.directory /data/app/igny8/frontend 2>/dev/null || true
git pull origin main
echo "$(date '+%Y-%m-%d %H:%M:%S') - Git pull completed"
} >> "$LOG_FILE" 2>&1