From 037dcd1fe840cc5ce08e0084377b1876bd2f3862 Mon Sep 17 00:00:00 2001 From: LBlend Date: Fri, 3 May 2024 01:57:37 +0200 Subject: [PATCH] tear down container before building & use new docker compose syntax --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2649678..651cefc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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