I am looking for deploy an angular website to an Azure static website. Unfortunately i am running under Azure DevOps Server (so on-premises) and there is no task to deploy to static website (but it is possible with Azure DevOps Services).
So basically i try to find powershell command which take as input an output artificat (a zip file) and deploy to static website.
Usually i used command Publish-AzWebApp but this one supports only Azure appservice and not Azure static website.
How can you achieve this ? Regards
For Creating New or Publishing the existing Static Site to Static Web Apps, it's the same command used in Azure PowerShell.
New-AzStaticWebApp
- This command creates a new static site or updates an existing static side in an existing resource group.
While creating the Static Web App or Publishing in Azure, you will use the GitHub RepositoryUrl and Repository token for continuous deployment.
Azure PowerShell Syntax of Creating or Publishing the Static Web App:
New-AzStaticWebApp -ResourceGroupName 'azure-rg-test' -Name 'staticweb-45asde' -Location 'Central US' -RepositoryUrl 'https://github.com/LucasYao93/blazor-starter' -RepositoryToken 'githubAccessToken' -Branch 'branch02' -AppLocation 'Client' -ApiLocation 'Api' -OutputLocation 'wwwroot' -SkuName 'Standard'
Refer to this Microsoft Doc - PowerShell Modules of Static web app for more information.