I have encountered the same issue. This is what i have done to fix it. It's a bit lengthy but does the job.
- Delete the existing app through azure cli (or create a new one - step 2).
az staticwebapp delete--name <app_name> -g <resource_group>
- Create a new app with no github integration etc.
az staticwebapp create --name <app_name> -g <resource_group>
- Fetch the deployment token using the following command
az staticwebapp secrets list --name <app_name> --query "properties.apiKey"
- Modified my github actions to use swa cli instead of the official github action - Azure/static-web-apps-deploy@
- name: Install Azure SWA CLI
run: npm install -g @azure/static-web-apps-cli
- name: Deploy
run: |
swa deploy <app_location> \
--api-location <api_location> \
--env <env> \
--deployment-token <deployment_token> \
-name <name_of_the_app>
Note: You can use the the official github action - Azure/static-web-apps-deploy@ to do deployment too but i haven't tested it. So, cannot confirm if it will work. I prefer this way.