From fce3314c1ccad6cfef67eab18136cb43f879a589 Mon Sep 17 00:00:00 2001 From: Gyeongho Yang Date: Wed, 4 Dec 2024 00:33:30 +0900 Subject: [PATCH] feat: update cd script to applying changed dirs --- .github/workflows/be-cd.yaml | 10 ++++++---- .github/workflows/fe-cd.yaml | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/be-cd.yaml b/.github/workflows/be-cd.yaml index d799fa4..ab9a606 100644 --- a/.github/workflows/be-cd.yaml +++ b/.github/workflows/be-cd.yaml @@ -57,7 +57,9 @@ jobs: username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }} script: | - cd ~/${{ github.event.repository.name }} - docker compose stop be - docker compose rm -f be - docker compose up -d be + cd ~/${{ github.event.repository.name }}/server + docker compose -f docker-compose-db.yaml pull + docker compose -f docker-compose-be.yaml pull + docker compose -f docker-compose-be.yaml down + docker compose -f docker-compose-be.yaml up -d + docker compose -f docker-compose-db.yaml up -d diff --git a/.github/workflows/fe-cd.yaml b/.github/workflows/fe-cd.yaml index 20be38d..e18175f 100644 --- a/.github/workflows/fe-cd.yaml +++ b/.github/workflows/fe-cd.yaml @@ -41,7 +41,7 @@ jobs: source: frontend/dist/, server/ target: ~/${{ github.event.repository.name }} - - name: Reload docker compose + - name: Restart docker compose uses: appleboy/ssh-action@v1.0.3 with: host: ${{ secrets.HOST }} @@ -49,6 +49,6 @@ jobs: key: ${{ secrets.KEY }} script: | cd ~/${{ github.event.repository.name }}/server - docker compose stop fe - docker compose rm -f fe - docker compose up -d fe + docker compose -f docker-compose-fe.yaml pull + docker compose -f docker-compose-fe.yaml down + docker compose -f docker-compose-fe.yaml up -d