@Gurbakhshish Singh Thank you for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.
To test this behavior, I have created a release pipeline with empty job, added Azure CLI
task and by using the below cmdlet I am able to deploy the static webapp successfully.
Azure CLI cmdlet used:
az staticwebapp create -n qatestchecker -g mytestresourcegroup
Sample output for reference:
If you want to deploy the static webapp using the PowerShell cmdlet New-AzStaticWebApp
from your devops pipeline, then you need to Azure Powershell
task and use the below cmdlet.
New-AzStaticWebApp -ResourceGroupName '<ResourceGroupName>' -Location 'central us' -Name '<staticwebappName>' -SkuName 'Standard' -AppLocation './src' -ApiLocation ' ' -OutputLocation './src'
Sample output for reference:
Note:
Change the values for the parameters applocation, apilocation and outputlocation based on the which framework you want to deploy your static webapp.
Feel free to reach back to me if you have any further questions on this.