diff --git a/.github/workflows/dev-deploy.yml b/.github/workflows/dev-deploy.yml index 6a57797..c02a208 100644 --- a/.github/workflows/dev-deploy.yml +++ b/.github/workflows/dev-deploy.yml @@ -69,6 +69,6 @@ jobs: cd ~/snackgame-server/repo git fetch origin dev git checkout dev - git pull origin dev + git pull origin dev --no-recurse-submodules chmod +x scripts/deploy-dev.sh scripts/deploy-dev.sh \ No newline at end of file diff --git a/.github/workflows/production-deploy.yml b/.github/workflows/production-deploy.yml index cda77af..0a85f11 100644 --- a/.github/workflows/production-deploy.yml +++ b/.github/workflows/production-deploy.yml @@ -70,7 +70,7 @@ jobs: cd ~/snackgame-server/repo git fetch origin main git checkout main - git pull origin main + git pull origin main --no-recurse-submodules chmod +x scripts/deploy-rolling.sh scripts/deploy-rolling.sh \ ${{ secrets.NLB_BACKEND_02_HTTP }} \ @@ -100,7 +100,7 @@ jobs: cd ~/snackgame-server/repo git fetch origin main git checkout main - git pull origin main + git pull origin main --no-recurse-submodules chmod +x scripts/deploy-rolling.sh scripts/deploy-rolling.sh \ ${{ secrets.NLB_BACKEND_01_HTTP }} \ diff --git a/scripts/deploy-rolling.sh b/scripts/deploy-rolling.sh index 9803f69..b6361db 100755 --- a/scripts/deploy-rolling.sh +++ b/scripts/deploy-rolling.sh @@ -1,7 +1,6 @@ set -euo pipefail - if [ $# -ne 2 ]; then echo "Usage: $0 " exit 1 @@ -11,6 +10,8 @@ HTTP_BACKEND="$1" HTTPS_BACKEND="$2" +export PATH="$HOME/bin:$PATH" + COMPOSE_DIR="$HOME/snackgame-server" HEALTH_CHECK_URL="http://localhost:8080/rankings/1?by=BEST_SCORE" HEALTH_CHECK_TIMEOUT=120 @@ -78,7 +79,6 @@ wait_healthy() { return 1 } - rollback() { echo "[롤백] 이전 컨테이너로 복구 중..." cd "$COMPOSE_DIR" @@ -88,7 +88,6 @@ rollback() { exit 1 } - echo "======================================" echo "[배포 시작]" echo "[대상] HTTP=$HTTP_BACKEND, HTTPS=$HTTPS_BACKEND"