How do you use GitHub Actions for deploying ASP.NET Core to Azure?
Short answer: Create workflow YAML in .github/workflows/.
Explain a bit more
Use Azure WebApp Action to deploy. name: Build and Deploy ASP.NET Core on: push: branches: [ main ] jobs: build-and-deploy: runs-on: ubuntu-latest steps: uses: actions/checkout@v3 name: Setup .NET uses: actions/setup-dotnet@v3 with: dotnet-version: '6.0.x' name: Build run: dotnet publish -c Release -o publish name: Deploy to Azure Web App uses: azure/webapps-deploy@v2 with: app-name: 'my-azure-app' publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} package: ./publish
Example code
Create workflow YAML in .github/workflows/. Use Azure WebApp Action to deploy. name: Build and Deploy ASP.NET Core on: push: branches: [ main ] jobs: build-and-deploy: runs-on: ubuntu-latest steps: uses: actions/checkout@v3 name: Setup .NET uses: actions/setup-dotnet@v3 with: dotnet-version: '6.0.x' name: Build run: dotnet publish -c Release -o publish name: Deploy to Azure Web App uses: azure/webapps-deploy@v2 with: app-name: 'my-azure-app' publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} package: ./publish
Real-world example (ShopNest)
ShopNest on Azure typically uses App Service + SQL Database + Blob Storage + Application Insights for monitoring.
Say this in the interview
- Define — one clear sentence (the short answer above).
- Example — relate it to a project like ShopNest or your real work.
- Trade-off — when you would not use it.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png