This Static Web App has the maximum number of staging environments
Asked Answered
B

1

10

When setting up Azure Static Web Apps and using Github workflow, sometimes pull-request builds will fail. The error is:

This Static Web App already has the maximum number of staging environments.

Here's an excerpt from the GitHub Workflow build log: enter image description here

How do I remove some of the staging environments so builds / pull-requests can complete?

Brinna answered 19/8, 2021 at 8:51 Comment(0)
B
24

The reason for this is most likely because you've opened PR and closed them before the build has completed. Doing so leaves them in a "void" state, and is a current limitation of Azure Static Web Apps. In order to complete the builds you need to delete some of the previous staging environments first. The free hosting plan has 3 staging environments, while the Standard has 10.

You do this by going to your Static Web App in Azure and clicking "Environments" (Marked 1). Your staging environments are displayed under "Staging".

azure swa environment

Then check the ones you want to delete (Marked 2) and click "Delete" (Marked 3). That's it. Now you can re-run your pull-requests and the build will complete.

Brinna answered 19/8, 2021 at 8:51 Comment(1)
Related: github.com/Azure/static-web-apps/issues/898Cavie

© 2022 - 2024 — McMap. All rights reserved.