Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
318 stars 53 forks source link

Help me configure this horrible YML build pipeline for a static web app #1463

Open 1TheMuffinMan opened 1 month ago

1TheMuffinMan commented 1 month ago

YML pipelines are ridiculous. How did we go from GUI with helpful drop down lists and directory pickers to basically notepad where you have zero intellisense and need to run the pipeline several hundred times to figure out you formatted the commands incorrectly?

Anyways.

I'm using an Azure Static Web app and it created a build pipeline for me. The app is a React app using Webpack and it generates a dist folder at the root.

Here's the AzureStaticWebApp@0 task

  - task: AzureStaticWebApp@0
    inputs:
      app_location: ''
      output_location: 'dist'
      skip_api_build: true
      azure_static_web_apps_api_token: '$(AZURE_STATIC_WEB_APPS_API_TOKEN_XYZ123)'

I've tried every possible combination of values in app_location and output_location, but get the following error: Oryx built the app folder but was unable to determine the location of the app artifacts. Please specify the app artifact location.

mbenniston commented 1 month ago

Had the same error, removing an APP_LOCATION environment variable I had set fixed this