Skip to content

Commit fd1c549

Browse files
authored
fix: improve deployment script to clean stale Git locks before pulling latest code
1 parent e0fdbe9 commit fd1c549

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ jobs:
2525
echo "Changing to project directory..."
2626
cd ~/distributed-ticket-engine-redis
2727
28-
echo "Pulling latest code from main..."
29-
git fetch origin main
28+
echo "Cleaning stale Git locks & force pulling latest code..."
29+
rm -f .git/refs/remotes/origin/main.lock .git/index.lock .git/FETCH_HEAD || true
30+
git fetch origin main --prune --force
3031
git reset --hard origin/main
3132
3233
echo "Ensuring required app files exist..."

0 commit comments

Comments
 (0)