Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
A new preview environment is created per pull request which create a new subdomain with the pull request number. My static web app is configured with custom authentication using Azure Active Directory. In the app registration, you must specify the redirect uri.
The redirect uri do not support wildcard at the subdomain level so we need to automate the creation of the redirecturi for that specific pull request in a pipeline. Currently you can set the production branch (production_branch) name and the deployment environment (deployment_environment) for feature branches but you cannot change the pull request environment name.
It would be a nice feature to add an attribute to be able to configure the pull request environment name.
In theory youu could do this by:
deployment_environment: ${{ github.event_name == 'pull_request' && 'pr' || 'dev' }} but there is currently a bug that is not naming the PR-environments correctly.
A new preview environment is created per pull request which create a new subdomain with the pull request number. My static web app is configured with custom authentication using Azure Active Directory. In the app registration, you must specify the redirect uri. The redirect uri do not support wildcard at the subdomain level so we need to automate the creation of the redirecturi for that specific pull request in a pipeline. Currently you can set the production branch (production_branch) name and the deployment environment (deployment_environment) for feature branches but you cannot change the pull request environment name.
It would be a nice feature to add an attribute to be able to configure the pull request environment name.