Filter by title
Document Options

There are multiple versions of this document. Pick the options that suit you best.

UI:
Database:
Tiered:

Step 3: Deploying the ABP Application to Azure Web App Service

Deploying the ABP Application to Azure Web App Service using GitHub Actions

  1. Create a new GitHub repository for your project if you don't have one.

  2. Push your project to the new GitHub repository.

  3. Navigate to the Actions tab of your GitHub repository.

  4. Click the set up a workflow yourself button.

    Set up this workflow

  5. Copy this content to the opened file and commit it.

# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy ASP.Net Core with BlazorServer to Azure Web App

on:
  push:
    branches:
      - main
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    permissions:
      contents: read #This is required for actions/checkout

    steps:
      - uses: actions/checkout@v4

      - name: Set up .NET Core
        uses: actions/setup-dotnet@v4
        with:
          dotnet-version: '9.x'

      - name: Install ABP CLI
        run: |
          dotnet tool install -g Volo.Abp.Cli
          abp install-libs
        shell: bash

      - name: Build with dotnet
        run: dotnet build --configuration Release

      - name: Run migrations
        run: dotnet run
        working-directory: ./src/BlazorServer.NonTiered.DbMigrator

      - name: dotnet publish
        run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp
        working-directory: './src/BlazorServer.NonTiered.Blazor'

      - name: Generate openiddict.pfx
        run: dotnet dev-certs https -v -ep ${{env.DOTNET_ROOT}}/myapp/openiddict.pfx -p 7015b85e-89fc-4346-bfd0-a67d81de824e # Replace with your password

      - name: Upload artifact for deployment job
        uses: actions/upload-artifact@v4
        with:
          name: .net-app
          path: ${{env.DOTNET_ROOT}}/myapp

  deploy:
    runs-on: ubuntu-latest
    needs: build
    environment:
      name: 'Production'
      url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
    permissions:
      id-token: write #This is required for requesting the JWT
      contents: read #This is required for actions/checkout

    steps:
      - name: Download artifact from build job
        uses: actions/download-artifact@v4
        with:
          name: .net-app
      
      - name: Login to Azure
        uses: azure/login@v2
        with:
          client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_E74C791E153A4F38A50107C6B5341809 }}
          tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_7EC2684BA1FB43F1B563AD3832D0A5AC }}
          subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_81FB702F1C8F43388B145043765CC189 }}

      - name: Deploy to Azure Web App
        id: deploy-to-webapp
        uses: azure/webapps-deploy@v3
        with:
          app-name: 'abp-blazor-webapp-layered'
          slot-name: 'Production'
          package: .
  1. Navigate to the Settings tab of your GitHub repository.

  2. Click the Secrets button.

  3. Click the New repository secret button.

    New repository secret

  4. Add the following secrets:

  • CONNECTION_STRING: The connection string of your database.

    Example of Azure SQL connection string:

    Azure sql connection string

  • AZUREAPPSERVICE_PUBLISHPROFILE: The publish the profile of your Azure Web App Service. You can download it from the Overview tab of your Azure Web App Service.

    Publish profile

  1. Navigate to the Actions tab of your GitHub repository.

  2. Click the Deploy to Azure Web App workflow.

    Deploy to Azure Web App

  3. Click the Run workflow button.

    Run workflow

  4. Navigate to the web app URL to see the deployed application.

    Azure Web App

If deploying your application was unsuccessful, you can check the logs of the deployment by clicking the Deploy to Azure Web App workflow and then clicking the deploy-to-webapp job.

If deployment is successful, but you get an error when you navigate to the web app url, you can check the logs of the web app by clicking the Logs button on the Overview tab of your Azure Web App Service.

Finally, you have the CI/CD pipeline for your application. Every time you push your code to the main branch, your application will be deployed to Azure Web App Service automatically.

What's next?

Contributors


Last updated: June 16, 2025 Edit this page on GitHub

Was this page helpful?

Please make a selection.

To help us improve, please share your reason for the negative feedback in the field below.

Please enter a note.

Thank you for your valuable feedback!

Please note that although we cannot respond to feedback, our team will use your comments to improve the experience.

In this document
ABP Community Talks
Beyond WordPress: A Developer-Friendly CMS for .NET
28 Aug, 17:00
Online
Watch the Event
ABP Live Webinar
Webinar Calendar Webinar Calendar
Discover
ABP Platform
Register Now
Sep 17
Wednesday,
17:00 UTC
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book