Skip to content

Commit 3de61ec

Browse files
committed
Make deploy workflow resilient to git history divergence
1 parent 0613cba commit 3de61ec

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
@@ -18,5 +18,6 @@ jobs:
1818
key: ${{ secrets.EC2_SSH_KEY }}
1919
script: |
2020
cd ${{ secrets.EC2_APP_DIR }}/RAG
21-
git pull origin main
22-
docker compose up -d --build
21+
git fetch origin main
22+
git reset --hard origin/main
23+
docker compose up -d --build --remove-orphans

0 commit comments

Comments
 (0)