I have an Azure Static webapp running and a pipeline building PR builds. In the release task you can state the production branch, and all other branches should be released as preview environments.
From helptext: "Production branch. When specified and Deployment Environment is empty, deployments from other branches will be preview environments"
YML
steps:
- task: AzureStaticWebApp@0
displayName: 'Static Web App: '
inputs:
workingDirectory: '$(System.DefaultWorkingDirectory)/my-portal'
app_location: /
skip_app_build: true
skip_api_build: false
is_static_export: false
verbose: true
azure_static_web_apps_api_token: 'token'
production_branch: develop
When running on branch refs/pull/1028/merge - the deployment still happens on production and a release environment is not created.
Is there a different way to configure this behaviour in Azure Devops, or does it simply not work?