Skip to content

Commit

Permalink
update link to mainsite before/after staging slot swap
Browse files Browse the repository at this point in the history
  • Loading branch information
TimHess committed Feb 19, 2024
1 parent 5a96f33 commit ca8e056
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/stage-prod-swap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ jobs:
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Change mainsite link to prod and restart
shell: bash
run: |
az webapp config appsettings set --resource-group steeltoe --name docs-steeltoe --slot Staging --settings mainsite_host=https://steeltoe.io
az webapp restart --resource-group steeltoe --name docs-steeltoe --slot Staging
echo "Waiting 60 seconds until beginning to curl to see if the site is back up"
sleep 60
until $(curl --output /dev/null --silent --head --fail https://docs-staging.steeltoe.io); do
printf '.'
sleep 5
done
- name: Swap slots
run: az webapp deployment slot swap -s ${{ vars.STAGING_SLOT_NAME }} -n ${{ vars.AZURE_WEBAPP_NAME }} -g ${{ vars.AZURE_RESOURCE_GROUP }}

- name: Change mainsite link to staging and restart
run: |
az webapp config appsettings set --resource-group steeltoe --name docs-steeltoe --slot Staging --settings mainsite_host=https://staging.steeltoe.io
az webapp restart --resource-group steeltoe --name docs-steeltoe --slot Staging

0 comments on commit ca8e056

Please sign in to comment.