Azure Web Apps allow the ability to continuously deploy your application from multiple source control platforms instead of having to use a CICD system like Azure DevOps or Jenkins. Web Apps have a built-in feature called Deployment Center for continuous deployment.
In this tutorial, you will get a hands-on approach working with Deployment Center in an Azure Web App.
- An Azure subscription. If you don't have one, you can sign up for a day 30-day trial here
- An Azure Web App. Automatically spin one up with PowerShell code found here from my public GitHub repository.
- Code to be deployed into the web app which you can find here from my public GitHub repository. The code is a standard C# web boilerplate.
- A free GitHub account which you can sign up for here
Accessing the Web App
The first step will be to access the web app itself, which you can find in the Azure portal by going to the search bar and typing in App Services like in the screenshot below
Click App Services
Here is where all web apps will be shown. Choose the web app that created in section Prerequisites or a web app of your choosing.
The web app pane on the left will be shown as in the screenshot below.
Mine is called clouddevengineering because that's the name I used when I spun up a web app, but yours will be different.
Using Deployment Center
In the previous section, you saw how to access a web app. Next, you will see how to deploy code from the prerequisites section to the web app that was chosen.
Accessing the Deployment Center
As shown in the screenshot below in the search bar type and click deployment center
You will be presented with a screen to choose your continuous deployment strategy. This is where the code is chosen from a source control platform to be deployed to the web app.
As shown in the screenshot below, there are a few options.
In the Prerequisites section in bullet point 3, there is a link to GitHub where you will find a C# web frontend. Because you will be using that app from GitHub, choose the GitHub option.
Authenticating to Source Control with Deployment Center
Once GitHub is chosen, click the blue Authorize button as shown in the screenshot below.
An authorization page will show in another tab in your web browser with your GitHub account. Click the green Authorize AzureAppService button as shown in the screenshot below.
Next type in the password to your GitHub account and click the green Confirm password button.
After confirming the password, go back to the same Deployment Center page from when you clicked the blue Authorization button previously. You will now see a blue Continue button to click as shown in the screenshot below.
Configuring the Deployment
After the blue Continue button is clicked, it's time to start the configuration of the deployment.
The next screen you will see as shown in the screenshot below is the Configuration options. The options are for choosing how you want to deploy your app. Select App Service build service with Kudu. Kudu is an engine in Azure Websites for Git deployments.
Click the blue Continue button.
The screen after Continue is clicked as you can see in the screenshot below is for choosing which GitHub repository to use, which is where the code exists that is being deployed to the web app.
Use the webcore repository as explained in the Prerequisites section and click the blue Continue button.
The configuration is ready! Click finish.
The deployment will start running. This may take a few minutes.
After a few minutes, you will see the web app was successful. Congrats on a successful deployment!
In this tutorial, you saw first-hand how to deploy a C# web app using Deployment Center from Azure App Services. You used a standard C# boilerplate to deploy a web application. Kudu was used for the deployment engine and GitHub was used to retrieve the C# web code from.
My challenge to you is to try the same thing, but with a different web app to deploy. Maybe a Node.JS boilerplate?