Background:
I am creating a Github workflow that uses bicep and powershell to automate the deployment of this sample application: https://learn.microsoft.com/en-us/azure/api-management/howto-protect-backend-frontend-azure-ad-b2c. Since I want to use github version control for the static web site, I am substituting an azure static web site for the static web site feature of azure (blob) storage used in the tutorial.
Plan:
I create an azure static web site using the portal and decompile the download the ARM template into bicep and run the bicep script. Since I ran into some problems using the portal (see https://learn.microsoft.com/en-us/answers/questions/1381837/error-when-following-azure-static-web-app-tutorial ) I discovered that I could create a static web site using VSCode which is here: https://polite-cliff-0f03d401e.3.azurestaticapps.net/ (but VS code does not give you the opportunity to use an existing resource group).
Here is a screen shot with a slight modification (I added "how are you today?") I made and did a push to prove that the github workflow was working:

Failing Bicep Script:
So I went to the portal for the newly created azure static web app and I downloaded the JSON ARM template and decompiled it into bicep (and made some very minor changes like using a param for location and changing a variable name):
param location string = resourceGroup().location
param name string = uniqueString(resourceGroup().id)
param asw_AzureStaticAngularWebCallsAzureFunc_name string = 'AzureStaticAngularWebCallsAzureFunc'
resource asw_AzureStaticAngularWebCallsAzureFunc 'Microsoft.Web/staticSites@2022-09-01' = {
name: '${name}_AzureStaticAngularWebCallsAzureFunc'
location: location
sku: {
name: 'Free'
tier: 'Free'
}
properties: {
repositoryUrl: 'https://github.com/siegfried01/${asw_AzureStaticAngularWebCallsAzureFunc_name}'
branch: 'main'
stagingEnvironmentPolicy: 'Enabled'
allowConfigFileUpdates: true
provider: 'GitHub'
enterpriseGradeCdnStatus: 'Disabled'
}
}
So I say:
az deployment group create --name $name --resource-group $rg --mode Incremental --template-file deploy-AzureStaticWebSiteAngular.bicep | tr '\r' -d
Bicep Output:
{-
"id": "/subscriptions/accxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rg_AzureStaticWebSiteAngular/providers/Microsoft.Resources/deployments/AzureStaticWebSiteAngular",-
"location": null,-
"name": "AzureStaticWebSiteAngular",-
"properties": {-
"correlationId": "8c082549-c9a0-4ce2-bb9d-8286ab5a29f5",-
"debugSetting": null,-
"dependencies": [],-
"duration": "PT1.051282S",-
"error": null,-
"mode": "Incremental",-
"onErrorDeployment": null,-
"outputResources": [-
{-
"id": "/subscriptions/accxxxxxxxxxxxxxxxx/resourceGroups/rg_AzureStaticWebSiteAngular/providers/Microsoft.Web/staticSites/AzureStaticAngularWebCallsAzureFunc",-
"resourceGroup": "rg_AzureStaticWebSiteAngular"-
}-
],-
"outputs": null,-
"parameters": {-
"asw_AzureStaticAngularWebCallsAzureFunc_name": {-
"type": "String",-
"value": "AzureStaticAngularWebCallsAzureFunc"-
},-
"location": {-
"type": "String",-
"value": "westus2"-
},-
"name": {-
"type": "String",-
"value": "rajz6szjnw7ku"-
},-
"staticSites_AzureStaticAngularWebCallsAzureFunc_name": {-
"type": "String",-
"value": "AzureStaticAngularWebCallsAzureFunc"-
}-
},-
"parametersLink": null,-
"providers": [-
{-
"id": null,-
"namespace": "Microsoft.Web",-
"providerAuthorizationConsentState": null,-
"registrationPolicy": null,-
"registrationState": null,-
"resourceTypes": [-
{-
"aliases": null,-
"apiProfiles": null,-
"apiVersions": null,-
"capabilities": null,-
"defaultApiVersion": null,-
"locationMappings": null,-
"locations": [-
"westus2"-
],-
"properties": null,-
"resourceType": "staticSites",-
"zoneMappings": null-
}-
]-
}-
],-
"provisioningState": "Succeeded",-
"templateHash": "16670300580194434247",-
"templateLink": null,-
"timestamp": "2023-10-19T17:28:49.379536+00:00",-
"validatedResources": null-
},-
"resourceGroup": "rg_AzureStaticWebSiteAngular",-
"tags": null,-
"type": "Microsoft.Resources/deployments"-
}
Here are the results:
https://witty-dune-0a9dce71e.4.azurestaticapps.net/
Here is the screen shot indicating that it is ignoring the github repository URL I specified:

As of Oct 06 2023 it does not look at all like the original web site (https://polite-cliff-0f03d401e.3.azurestaticapps.net/) I created with VS Code extension. As you can see from the bicep, I'm using the same github repo that VSCode Created for me: https://github.com/siegfried01/AzureStaticAngularWebCallsAzureFunc
Question: How do I make bicep deploy the code in my github repo?
Thanks
Siegfried