Skip to content

Commit

Permalink
GH Action slot swap
Browse files Browse the repository at this point in the history
  • Loading branch information
harryy94 committed Jan 27, 2025
1 parent 06a2a60 commit 9bafdf5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/deploy-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9bafdf5

Please sign in to comment.