webapps-deploy: ZipDeploy to Web App via Github Actions fails without any error details


I’m setting up a new deploy pipeline with Github Actions. The action was initially created from Azure via the Deployment Center for the web app in question.

The project that gets build is a classic ASP.NET Framework (4.5.1) application. The web-app that I’m trying to deploy to has been around for many years (if that matters).

I have tried to run the deploy script both when the web-app is started and when it is stopped (to exclude locking issues).

The Github action is defined as follows:

# 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 app to Azure Web App - <webapp-name>(<webapp-slot-name>)

      - <branch-name>

    runs-on: 'windows-latest'

    - uses: actions/checkout@v2

    - name: Setup MSBuild path
      uses: microsoft/setup-msbuild@v1.0.2

    - name: Setup NuGet
      uses: NuGet/setup-nuget@v1.0.5

    - name: Restore NuGet packages
      run: nuget restore .\<path-to-solution>\<solution-name>.sln

    - name: Publish to folder
      run: msbuild .\<path-to-project>\<project-name>.csproj /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:Configuration="Release" /p:_PackageTempDir="\published\"

    - name: Upload artifact for deployment job
      uses: actions/upload-artifact@v2
        name: ASP-app
        path: '/published/**'

    runs-on: 'windows-latest'
    needs: build
      name: '<webapp-slot-name>'
      url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

    - name: Download artifact from build job
      uses: actions/download-artifact@v2
        name: ASP-app

    - name: Deploy to Azure Web App
      id: deploy-to-webapp
      uses: azure/webapps-deploy@v2
        app-name: '<webapp-name>'
        slot-name: '<webapp-slot-name>'
        publish-profile: ${{ secrets.AzureAppService_PublishProfile_<publish-profile-id> }}
        package: .

So, the source gets built, and the zip is uploaded to local/Temp and is extracted. But then it just stops and I get the following error message:

Cleaning up temp folders from previous zip deployments and extracting pushed zip file D:\local\Temp\zipdeploy\<file-id>.zip (16.98 MB) to D:\local\Temp\zipdeploy\extracted
Error: Failed to deploy web package to App Service.
Error: Deployment Failed with Error: Package deployment using ZIP Deploy failed. Refer logs for more details.

I can see that the zip has been extracted into D:\local\Temp\zipdeploy\extracted. So my guess is that something happens after that. I have enabled detailed logging but it does not give any further information about what goes wrong.

As I said, this web app has been around for many years. And there has been multiple deploy-methods. For example, I don’t know if deploy.cmd is invoked in this process. If it is, there might be some mismatch there.

Grateful for any advice about how to diagnose the error and get the deploy working.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 21 (4 by maintainers)

Most upvoted comments

What is this status of this bug? When I try to deploy a file of .zip type, I get an error saying this file isn’t supported. I can add images if need be.