Azure Static Web App Deployment

Ryan Johnson 0 Reputation points
2024-03-05T21:23:37.2733333+00:00

I have tried deploying using swa. It seems to work, but it cuts off after the "Deploying project to Azure Static Web Apps..." in the output. It looks like the deployment is not actually working as I cannot access the files on the web site.

swa deploy --app-name <app-name> --output-location .\wwwroot\ --env production

Output :

Welcome to Azure Static Web Apps CLI (1.1.6)

Using configuration "<app-name>" from file:

<path to>\swa-cli.config.json

Deploying front-end files from folder:

<path to>\wwwroot

Consider providing api-language and version using --api-language and --api-version flags,

otherwise default values apiLanguage: node and apiVersion: 16 will apply

Checking Azure session...

✔ Successfully logged into Azure!

Checking project "<project name>" settings...

✔ Successfully setup project!

Deploying to environment: production

Deploying project to Azure Static Web Apps...

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

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2024-03-06T03:15:19.06+00:00

    Hi @Ryan Johnson A missing html file shouldn't cause your deployment to hang. Personally, I don't care for the SWA CLI, but I would start by confirming the current configuration in your swa-cli.config.json file or using swa --print-config. You didn't mention it, but also check/update your deployment token, swa deploy --print-token, using either swa login or swa deploy --print-token.I would, instead, deploy a static web app by connecting the resource to my repo, which will create the deployment yaml and will continuously deploy as changes are made to the repo.

    But here some additional resources which you may find helpful:

    If, however, you are still encounter issues with deploying your SWA through the VS Code, portal, or CLI, please comment down below with the error message(s) you're seeing so we can best assist you.

    0 comments No comments

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.