How do I deploy (release) a static web app from a pipeline artifact?

Oblio 46 Reputation points
2025-01-23T19:26:14.7566667+00:00

I have a build pipeline that creates a pipeline artifact that contains two zip files. I'd like to use AzureStaticWebApp@0 to deploy the static web app in a release pipeline. I've filled out the fields, but the 'working directory' points at the zip file, and I don't know if that's correct.

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,065 questions
0 comments No comments
{count} vote

Accepted answer
  1. Shree Hima Bindu Maganti 2,745 Reputation points Microsoft Vendor
    2025-01-29T11:55:33.8433333+00:00

    Hi @Oblio
    Thanks for the question and using MS Q&A platform.
    To deploy a static web app from a pipeline artifact using the AzureStaticWebApp@0 task, make sure the 'working directory' points to the folder with the files to be deployed, not the zip file itself. The workingDirectory should be set to where the artifact is extracted or where the files are located.

    If your build pipeline creates a zip file, you might need to extract that zip in the release pipeline before pointing to the directory with the extracted files. Also, double-check that the APP_LOCATION and OUTPUT_LOCATION in your pipeline config match your project's structure.
    Tutorial: Deploy Bitbucket repositories on Azure Static Web Apps

    Use Azure Pipelines to build and deploy a Python web app to Azure App Service
    If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.


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.