tear down container before building & use new docker compose syntax

This commit is contained in:
LBlend committed 2024-05-03 01:57:37 +02:00
1 parent 5bbc6aafd7
commit 037dcd1fe8
1 file changed
+1 -1
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
- name: Connect, pull, build and deploy
run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ secrets.WORK_DIR }} && git checkout ${{ secrets.MAIN_BRANCH }} && git pull && docker-compose up -d --build && exit"
run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ secrets.WORK_DIR }} && git checkout ${{ secrets.MAIN_BRANCH }} && git pull && docker compose down && docker compose up -d --build && exit"
- name: Clean up
run: rm -rf ~/.ssh