ci(deploy): use fetch+reset instead of pull to ignore stale build artifacts
Some checks failed
Deploy / Deploy to Production (push) Has been cancelled

Production server's working tree had a modified tsbuildinfo from previous
builds that was blocking 'git pull' after we removed the file from tracking.
Switch to 'git fetch origin main + git reset --hard origin/main' so the
deploy server always matches main exactly, ignoring any local working-tree
state.
This commit is contained in:
Semih
2026-05-10 23:58:55 +00:00
parent 21260f6285
commit e978efa37c

View File

@@ -33,7 +33,11 @@ jobs:
echo "$(date '+%Y-%m-%d %H:%M:%S') - Starting deployment..."
echo "$(date '+%Y-%m-%d %H:%M:%S') - Pulling latest changes..."
git pull origin main
git fetch origin main
# Hard reset to remote to drop any stale build artifacts (e.g. tsbuildinfo)
# that would otherwise block 'git pull'. The deploy server is treated as
# a deployment target, not a development checkout.
git reset --hard origin/main
echo "$(date '+%Y-%m-%d %H:%M:%S') - Installing dependencies..."
pnpm install --frozen-lockfile