diff --git a/.github/workflows/production-deploy.yml b/.github/workflows/production-deploy.yml index feffd4c..671b668 100644 --- a/.github/workflows/production-deploy.yml +++ b/.github/workflows/production-deploy.yml @@ -69,9 +69,8 @@ jobs: script: | cd ~/snackgame-server/repo git fetch origin main - git checkout main - git pull origin main --no-recurse-submodules - + git checkout -B main origin/main + git pull --ff-only origin main --no-recurse-submodules chmod +x scripts/deploy-rolling.sh scripts/deploy-rolling.sh \ ${{ secrets.NLB_BACKEND_02_HTTP }} \ @@ -100,9 +99,8 @@ jobs: script: | cd ~/snackgame-server/repo git fetch origin main - git checkout main - git pull origin main --no-recurse-submodules - + git checkout -B main origin/main + git pull --ff-only 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-dev.sh b/scripts/deploy-dev.sh index 939c7b0..1e2402d 100644 --- a/scripts/deploy-dev.sh +++ b/scripts/deploy-dev.sh @@ -1,4 +1,4 @@ - +#!/bin/bash set -euo pipefail diff --git a/scripts/deploy-rolling.sh b/scripts/deploy-rolling.sh index 49fcbb1..09c9ef4 100755 --- a/scripts/deploy-rolling.sh +++ b/scripts/deploy-rolling.sh @@ -1,4 +1,4 @@ - +#!/bin/bash set -euo pipefail @@ -11,7 +11,6 @@ HTTP_BACKEND="$1" HTTPS_BACKEND="$2" - export PATH="$HOME/bin:$PATH" COMPOSE_DIR="$HOME/snackgame-server" @@ -38,10 +37,7 @@ set_drain() { --backend-set-name snackgame-http \ --backend-name "$HTTP_BACKEND" \ --is-drain "$is_drain" \ - --is-backup false \ - --is-offline false \ - --wait-for-state SUCCEEDED \ - --force + --wait-for-state SUCCEEDED oci nlb backend update \ --auth instance_principal \ @@ -49,10 +45,7 @@ set_drain() { --backend-set-name snackgame-https \ --backend-name "$HTTPS_BACKEND" \ --is-drain "$is_drain" \ - --is-backup false \ - --is-offline false \ - --wait-for-state SUCCEEDED \ - --force + --wait-for-state SUCCEEDED }