1

I am trying to deploy an Static Web app to Azure using Git Actions workflow. My web application is using ASP.NET Core.

To provide a minimum working example (MWE), I have created a test public Github Repo here.

Somehow the problem is in the paths. No matter, what path I set for the output_location, I always get an error that The app build failed to produce artifact folder

How do I set the paths correctly in my workflow YML file?

My Azure Configuration:

enter image description here

PS: I already checked the description about the path variables at MS Doc page for Build configuration for Azure Static Web Apps

      ###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
      # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
      app_location: "/TestASPStaticWebsite/TestASPStaticWebsite/" # App source code path
      api_location: "/TestASPStaticWebsite/TestASPStaticWebsite/" # Api source code path - optional
      output_location: "build" # Built app content directory - optional
      ###### End of Repository/Build Configurations ######
skm
  • 5,015
  • 8
  • 43
  • 104

1 Answers1

0

After my testing, what I can conclude is that azure static web app does not support asp.net core project.

Azure static web app support Framework

After careful reading, we can find that azure static web app only supports front-end framework projects that can generate build, dist and other folders.

Because I didn't find a document saying that the asp.net core project is supported, I think it is not supported. If it is supported, why does the azure web app exist.

I hope my test result will help you, you can use azure webapp to create applications. No need to continue to spend time on azure static webapp, if you have pure front-end applications, you can continue to use azure static webapp in the future.

Jason Pan
  • 15,263
  • 1
  • 14
  • 29
  • "Azure Web App" provide several additional features, for example, if your web application also needs a Database then you cannot host your application as `Azure Static Web App`. And, I did not understand your last sentence, "No need to continue to spend time on `azure static webapp`, if you have pure front-end applications, you can continue to use `azure static webapp` in the future." – skm May 04 '22 at 07:50
  • @skm Azure Static Web App is very cheap compared to Azure Web App, which means that many functions have been castrated. In short, Azure Static Web App supports packaged applications similar to index.html pages. – Jason Pan May 04 '22 at 08:07
  • @skm I don't know where is your confusion? The project in your repo is asp.net core 5.0, azure static webapp does not support TestASPStaticWebsite.dll generated after publishing. If you are interested, you can [create a support ticket on azure portal](https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request). – Jason Pan May 04 '22 at 08:09