How to automate Azure Static Web App Deployment to avoid Snowflakes?
As previously discussed (see https://learn.microsoft.com/en-us/answers/questions/1397184/how-to-automate-creation-of-azure-static-web-site), when an azure static web app has been deleted (perhaps accidentally deleted), it is necessary to
- Create the azure web app with bicep or powershell or azure cli
- fetch the deployment token from the newly created web app (how do I do this in a github workflow?)
- take that deployment token and update the github secret, (how do I do this in a script?)
- start the github workflow that runs all those npm commands compile and build and deploy the angular code (how do I do this from a script or github workflow?)
I tried enhancing the workflow yml script created by vscode plugin for azure static web apps so I could start the workflow using the github webpage without doing a git-push. I add this code to the workflow:
on:
push:
...
workflow_dispatch:
branches:
- main
Because I added "workflow_dispatch" I now see it displayed in the github action page.
When I click on the "run workflow" I try to manually start the execution of the workflow and click on the workflow run to observe the progress. However, I don't see any progress!
I just see this display and apparently it is not executing! Why is this? I was only able to start the workflow by doing a git push!
- Why is it necessary to modify the source code and push instead of just manually clicking on the workflow?
- So is this going to be an issue if I have another workflow call this workflow?
Thank you again for all your help so far!
Siegfried