Skip to content

Arnab-Developer/aspnet-webapi-azure-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASP.NET web api azure deploy

build test deploy

Deploy ASP.NET web api to azure web app with GitHub action.

Steps:

  • Create a new solution with two new apis and a web app.
  • Create some tests.
  • Push to GitHub.
  • Create three new web apps in Azure for two apis and a web app.
  • Download the publish profiles from Azure web app.
  • Store the publish profile's content to GitHub repository secrets.
  • Create workflow with GitHub action to build, test and deploy.
- name: 'Deploy to Azure WebApp'
  uses: azure/webapps-deploy@v2
  with:
    app-name: ${{ env.AZURE_WEBAPP_NAME }}
    publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
    package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/myapp

Tech stack

  • .NET 5
  • C# 9
  • xUnit for unit testing
  • Visual Studio 2019