Open Closed

Error in Instructions for Azure App Deployment #8740


User avatar
0
mhutchings77 created

I was following your instructions to deploy a small personal app to Azure. The instructions are on your site here: https://abp.io/docs/latest/solution-templates/layered-web-application/deployment/azure-deployment/step3-deployment-github-action?UI=BlazorServer&DB=EF&Tiered=No

When I copied the YAML file and placed it in GitHub, it failed with an error on Line 68. It says the error is "bad indentation of a mapping entry". I checked this against a YAML format checker and I am getting close to the same thing. I tried a few and the error is always line 68.

Anyway, I just thought I'd let someone know. Also, may want to update the dot-net version since version 9 is out now.

Last of all, I had a follow-up question since the steps say that for the step:

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.

I noticed that when I click on the Download Publish Profile, mine does not download and says "Basic Authentication is Disabled". Is this supposed to be like that?


1 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, yes you are right, there is a missing "steps" keyword before the invalid line. Here is the correct one:

    # 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
    
        steps:
          - uses: actions/checkout@v4
    
          - name: Set up .NET Core
            uses: actions/setup-dotnet@v4
            with:
              dotnet-version: '8.x'
              include-prerelease: true
    
          - 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 -- "${{ secrets.CONNECTION_STRING }}" # Set your connection string as a secret in your repository settings
            working-directory: ./src/blazorservertierdemo.DbMigrator  # Replace with your project name
    
          - name: dotnet publish apihost
            run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/apihost
            working-directory: ./src/blazorservertierdemo.HttpApi.Host # Replace with your project name
    
          - name: Generate authserver.pfx
            run: dotnet dev-certs https -v -ep ${{env.DOTNET_ROOT}}/apihost/authserver.pfx -p 2D7AA457-5D33-48D6-936F-C48E5EF468ED # Replace with your password
    
          - name: dotnet publish webapp
            run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/webapp
            working-directory: ./src/blazorservertierdemo.Blazor # Replace with your project name
    
          - name: Upload artifact for apihost
            uses: actions/upload-artifact@v4
            with:
              name: .net-apihost
              path: ${{env.DOTNET_ROOT}}/apihost
    
          - name: Upload artifact for webapp
            uses: actions/upload-artifact@v4
            with:
              name: .net-webapp
              path: ${{env.DOTNET_ROOT}}/webapp
    
      deploy:
        runs-on: ubuntu-latest
        needs: build
        environment:
          name: 'Production'
          url: ${{ steps.deploy-to-webapp-3.outputs.webapp-url }}
        steps:  
          - name: Download artifact from apihost
            uses: actions/download-artifact@v4
            with:
              name: .net-apihost
              path: ./apihost
    
          - name: Deploy apihost
            id: deploy-to-webapp-2
            uses: azure/webapps-deploy@v3
            with:
              app-name: 'apihost-blazorserver' # Replace with your app name
              slot-name: 'Production'
              publish-profile: ${{ secrets.apihostblazorserverPublishSettings }} # Set your Azure Web App to publish your profile as a secret in your repository settings
              package: ./apihost
    
          - name: Download artifact from webapp
            uses: actions/download-artifact@v4
            with:
              name: .net-webapp
              path: ./webapp
    
          - name: Deploy webapp
            id: deploy-to-webapp-3
            uses: azure/webapps-deploy@v3
            with:
              app-name: 'webapp-blazorserver' # Replace with your app name
              slot-name: 'Production'
              publish-profile: ${{ secrets.webappblazorserverPublishSettings }} # Set your Azure Web App to publish your profile as a secret in your repository settings
              package: ./webapp
    
    

    Anyway, I just thought I'd let someone know. Also, may want to update the dot-net version since version 9 is out now.

    I have created an issue for that: https://github.com/abpframework/abp/issues/22061

    I noticed that when I click on the Download Publish Profile, mine does not download and says "Basic Authentication is Disabled". Is this supposed to be like that?

    Yes, it's disabled by default, if you want to enable it, please refer to the answer below:

    https://learn.microsoft.com/en-us/answers/questions/1497453/how-to-download-publish-profile

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 20, 2025, 18:00