Last year we shared an article that demonstrated how to deploy your application to App Service using GitHub Actions. We are excited to share that we have added GitHub Actions as a build provider in the Deployment Center. This means it is even easier for developers to set up a continuous delivery pipeline with GitHub Actions. Follow the video or instructions below to get started.
First, create an Azure Webapp if you do not already have one. Follow one of these quick start guides.
Once the Webapp is created, open the Azure Portal and navigate to your Webapp. On the left side, click Deployment Center.
In the Deployment Center, Select GitHub. You will be prompted to authenticate with GitHub if this is your first time using the Deployment Center. Click Continue at the bottom.
On the next screen, choose GitHub Actions (Preview) as your build provider. Click Continue at the bottom.
On the following panel, use the dropdowns to select your repository and branch. The branch you choose will be deployed to the Webapp. Next, choose your language and version. When you are done, click Continue at the bottom.
The final screen shows a preview of the workflow file that will be committed into your repository under
.github/workflows/. The workflow file will check out your branch, set your language and version, build your application, and deploy it to your Webapp. The workflow will run any time there is a commit on your specified branch.
Click Finish after reviewing your selections. The Portal will commit this to the repository, which will trigger the the workflow to run.
You will be forwarded to the Deployment Center Dashboard, where you can see a list of your recent deployments. You can use the buttons at the top to disconnect the dashboard.
Congratulations! You now have an automated workflow that will build and deploy your app whenever new commits are pushed to the branch. As your application grows in complexity, so too can your workflows. There are plenty of other GitHub Actions to interact with the rest of your Azure Services as well.
As always, don’t forget to use UserVoice to suggest enhancements and vote for other suggestions.