Deployment Azure
Step-by-Step Guide to Deploying Azure Web Apps (Windows) with IIS
This guide assumes you already have permission to access the Azure subscription.
Setting up a new Azure Web App (Windows) with IIS
These instructions pertain to the staging environment. For the production environment, follow the same steps, but with a different web app name.
- Navigate to the Azure Portal
- Select Create a resource
- Choose Create a Web App
- In the Basic Tab
- Choose your existing subscription and resource group
- Under Instance Details, enter:
- Name: stride-website-staging
- Publish: Code
- Runtime stack: ASP.NET V4.8
- OS: Windows
- Region: as the current web
- Pricing Plan - An existing App Service Plan should appear if the region and resource group match that of the existing web app. Currently we use Standard S1.
- Click Next
- In the Deployment Tab - This step can be completed later if preferred.
- Enable Continuous deployment
- Select account, organisation
Stride
, repositorystride-website
and branchstaging-next
- Click Next
- In the Monitoring Tab
- Leave all settings as default
- Click Next
- Monitoring Tab
- Disable Application Insights - This is not needed at this stage
- Click Next
- In the Tags Tab
- Leave this blank unless you wish to add tags
- Click Next
- In the Review Tab
- Review your settings
- Click Create
- The GitHub Action will be added to the repository and run automatically. It will fail at this stage, but this will be resolved in the subsequent steps.
Adjusting the Web App Configuration
- Proceed to the newly created Web App
- Click on Configuration
- Select General Settings
- Change the Http Version to 2.0
- Click Save to apply the changes
Modifying the GitHub Action
The previous step will have added a GitHub Action to the repository, which will fail at this point. You need to modify the GitHub Action to correct the issue.
- Navigate to the repository
- Select Actions
- You have the option to stop the currently running action
- Locate the new GitHub Action (within this folder Stride Website -> staging-next repo -> .github -> workflows) which was automatically generated by the Azure Portal. We will need to reference the properties app-name and publish-profile and disable the push trigger.
- To disable the push trigger, retain only workflow_dispatch (manual trigger) as shown below:
on: # push: # branches: # - staging-next workflow_dispatch:
- Open the
stride-website-staging-azure.yml
workflow and update it with the properties from the previous step. Save your changes. - This workflow may also need to be added to the production branch master if it is not already there.
- Execute the workflow stride-website-staging-azure.yml. Ensure you select the correct branch staging-next and click Run workflow. This action will deploy the website to the Azure Web App.