Wrong deploy destination for static web app

Jacky Lam 210 Reputation points
2023-07-25T02:39:45.7733333+00:00

Hi,

Recently, I try to deploy my static web app by CLI like this:

swa deploy --app-name mystaticapp --env production ./dist/fuse

It runs successfully and show this in the output:

√ Project deployed to https://icy-plant-00c90ef1e.3.azurestaticapps.net

However, the endpoint of my static web app resource should be https://victorious-tree-05ba2ad00.3.azurestaticapps.net instead.

And I search around all the static web app I owned but none of them has endpoint started with icy-plant. I wonder where it comes from and how can I deploy to correct end point. Thanks.

Best Regards,

Jacky

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,180 questions
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 22,706 Reputation points Moderator
    2023-07-26T17:14:17.16+00:00

    @Jacky Lam Thanks for reaching here!

    It's possible that the endpoint name "icy-plant-00c90ef1e" was automatically generated by Azure Static Web Apps during the deployment process.

    You may deploy using a swa-cli.config.json configuration file in your project and have a single configuration entry.

    {
      "configurations": {
        "my-app": {
          "appLocation": "./",
          "apiLocation": "api",
          "outputLocation": "frontend",
          "start": {
            "outputLocation": "frontend"
          },
          "deploy": {
            "outputLocation": "frontend"
          }
        }
      }
    }
    

    Then you can deploy your application by running the following steps:

    1. If your front-end application requires a build step, run swa build or refer to your application build instructions.
    2. Deploy your app: swa deploy
    3. If you have multiple configuration entries, you can provide the entry ID to specify which one to use: swa deploy my-otherapp

    Note that the path for outputLocation must be relative to the appLocation.

    Check for the options you use with swa deploy.

    Let us know.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.