2

I have a deployed a static web application using a YAML task:

  - task: AzureStaticWebApp@0
    name: DeployStaticWebApp
    displayName: Deploy Static Web App
    inputs:
      app_location: 'web-app'
      cwd: 'package'
      azure_static_web_apps_api_token: $(token)

I see a random URL after every deployment as you see here. How do I set a hardcoded URL via deployment?

enter image description here

Harshitha
  • 3,784
  • 2
  • 4
  • 9
user989988
  • 3,006
  • 7
  • 44
  • 91

1 Answers1

2

Random URL on deploying azure static web app

Yes, by default Azure Static Web App auto-generates domain URL.

The option available to access the Static WebApp with another URL is to Configure a new Custom domain.

You can see MSDoc mentions the same.

By default, Azure Static Web Apps provides an auto-generated domain name for your website, but you can point a custom domain to your site.

Even if we configure the custom domain, the auto-generated URL cannot be changed, just a new domain is added in the Custom domain section.

enter image description here

Refer MSDoc to Configure custom domain for Azure Static WebApp.***

I have observed that the auto-generated URL name is same as the workflow file last name.

Ex: 
URL - https://orange-smoke-099cdb110.2.azurestaticapps.net
Workflow name - azure-static-web-apps-orange-smoke-099cdb110.yml

I have tried to change the yml file name and run the job again. Unable to change it.

Harshitha
  • 3,784
  • 2
  • 4
  • 9