Fix deploy.sh: uncomment git pull so server gets latest code on deploy
Previously the git fetch/reset block was commented out and the script only deployed whatever was already in the repo dir. Uncommented it and added git config core.fileMode false to prevent permission-drift merge conflicts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e60639c58d
commit
fdd63482f6
1 changed files with 10 additions and 13 deletions
23
deploy.sh
23
deploy.sh
|
|
@ -70,21 +70,18 @@ else
|
|||
fi
|
||||
|
||||
# ── Pull Latest Code ─────────────────────────────────────────────
|
||||
# Run `git pull` manually before running this script.
|
||||
|
||||
# log "Pulling latest code..."
|
||||
# cd "${REPO_DIR}"
|
||||
#
|
||||
# if [ -d .git ]; then
|
||||
# git fetch --all
|
||||
# git reset --hard origin/$(git rev-parse --abbrev-ref HEAD)
|
||||
# log "Code updated to $(git log --oneline -1)"
|
||||
# else
|
||||
# warn "Not a git repo — using existing files"
|
||||
# fi
|
||||
|
||||
log "Pulling latest code..."
|
||||
cd "${REPO_DIR}"
|
||||
log "Using current code at $(git log --oneline -1 2>/dev/null || echo 'unknown')"
|
||||
|
||||
if [ -d .git ]; then
|
||||
git config core.fileMode false
|
||||
git fetch --all
|
||||
git reset --hard origin/$(git rev-parse --abbrev-ref HEAD)
|
||||
log "Code updated to $(git log --oneline -1)"
|
||||
else
|
||||
warn "Not a git repo — using existing files"
|
||||
fi
|
||||
|
||||
# ── Environment File ─────────────────────────────────────────────
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue