staticwebdev / blazor-starter

A starter template in C# APIs and Blazor for Azure Static Web Apps
217 stars 104 forks source link

Tutorial failing on github-ci "Build and Deploy Job" #18

Closed mitchegrin-dev closed 2 years ago

mitchegrin-dev commented 2 years ago

Hi,

i was following the instructions on

https://docs.microsoft.com/de-de/azure/static-web-apps/deploy-blazor

with no variations. But the github ci fails:

`App Directory Location: '/' was found. No Api directory specified. Azure Functions will not be created. Starting to build app with Oryx Azure Static Web Apps utilizes Oryx to build both static applications and Azure Functions. You can find more details on Oryx here: https://github.com/microsoft/Oryx ---Oryx build logs---

Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx You can report issues at https://github.com/Microsoft/Oryx/issues

Oryx Version: 0.2.20210410.1, Commit: <>, ReleaseTagName: <>

Build Operation ID: <> Repository Commit : <>

Detecting platforms... Could not detect any platform in the source directory. Error: Could not detect the language from repo.

---End of Oryx build logs--- Oryx was unable to determine the build steps. Continuing assuming the assets in this folder are already built. If this is an unexpected behavior please contact support. Finished building app with Oryx Failed to find a default file in the app artifacts folder (/). Valid default files: index.html,Index.html. If your application contains purely static content, please verify that the variable 'app_location' in your workflow file (located in .github/workflows) points to the root of your application. If your application requires build steps, please validate that a default file exists in the build output directory.

`

Does someone know what I am doing wrong?

mitchegrin-dev commented 2 years ago

No ideas?

craigshoemaker commented 2 years ago

It looks like you may have selected an incorrect preset. The Blazor presets look like this:

app_location: "Client"
api_location: "Api"
output_location: "wwwroot"

Look for the configuration file located in the .git folder in your repository. If you make your setting match what you see above, the build should succeed for you.

mitchegrin-dev commented 2 years ago

Thank you very much. This worked :)