In the local directory
- Create your folder
mkdir myfolder
cd myfolder
- Create simple html. Notice that it will generate index.html file with content "test app service deploy"
echo "test app service deploy" >> index.html
- Login to azure account using cli
az login
- After successful authentication, deploy your file using this command
az webapp up -g <resourcegroupName> -n <yourAppName>--html
example:
az webapp up -g az204pg -n testappservicedeploy --html
Note: It will automatically create own App Service Plan
Output:
- Access your new static site by clicking or pasting the default domain in the browser.
- Bonus: To delete this sample static site
az webapp delete --name testappservicedeploy --resource-group az204pg