diff --git a/.github/workflows/deploy-env.yaml b/.github/workflows/deploy-env.yaml index 9f9795c..1fc4e42 100644 --- a/.github/workflows/deploy-env.yaml +++ b/.github/workflows/deploy-env.yaml @@ -147,3 +147,14 @@ jobs: slot-name: 'staging' publish-profile: ${{ env.PUBLISHING_PROFILE }} images: 'ghcr.io/${{ env.REPO }}:${{ github.sha }}' + + - name: Wait for Staging to warm up + id: wait-for-staging + uses: jtalk/url-health-check-action@v4 + with: + url: https://s186${{ vars.ENVIRONMENT_PREFIX }}-cl-web-fd.azurefd.net/staging-health + retry-delay: 3s + max-attempts: 5 + + - name: Swap slot to production + run: az webapp deployment slot swap --name s186${{ vars.ENVIRONMENT_PREFIX }}-cl-web-app-service --resource-group s186${{ vars.ENVIRONMENT_PREFIX }}-cl-web-rg --slot staging --target-slot production