From 7b42f972489e7315995f936c5e0ba540915eb2e4 Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Date: Mon, 23 Oct 2023 20:09:30 -0300 Subject: [PATCH] Fixes Desired Behavior --- .github/workflows/deploy-staging.yml | 3 ++- .github/workflows/refresh-deployment.yml | 3 +-- deploy.sh | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index d1c8400..2b612fe 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -47,4 +47,5 @@ jobs: script: | sudo apt update && sudo apt install -y jq python3-pip cd infra-hideyoshi.com - ./deploy.sh --staging \ No newline at end of file + ./deploy.sh --staging + ./refresh.sh \ No newline at end of file diff --git a/.github/workflows/refresh-deployment.yml b/.github/workflows/refresh-deployment.yml index 02f9511..3c1f566 100644 --- a/.github/workflows/refresh-deployment.yml +++ b/.github/workflows/refresh-deployment.yml @@ -14,7 +14,6 @@ jobs: name: Refresh deployments environment: prod runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - name: Checkout uses: actions/checkout@v3 @@ -22,7 +21,7 @@ jobs: - name: Executing Remote Commands - Refresh All Deployments env: deployments: ${{ github.event.client_payload.deployments }} - if: ${{ env.deployments == '' }} + if: ${{ env.deployments == '' || github.event.workflow_run.conclusion == 'success' }} uses: appleboy/ssh-action@master with: host: ${{ secrets.SSH_HOST }} diff --git a/deploy.sh b/deploy.sh index 6c0c271..9c8eb9a 100755 --- a/deploy.sh +++ b/deploy.sh @@ -109,10 +109,6 @@ function main() { kubectl apply -f \ ./deployment/cert-manager/cert-manager-certificate.yaml - if [[ $1 == "--staging" || $1 == "-s" ]]; then - bash ./refresh.sh - fi - fi exit 0