Fabian G. Williams aka Fabs

Fabian G. Williams

Sr. Program Manager, Microsoft @fabianwilliams.

Gotcha with CICD and Azure Static WebApps

If you lost your token on an Azure Static WebApp integrated with GitHub you could be SOL

Fabian Williams

3-Minute Read

Deploy Error on GitHub Page Gotcha

TLDR;

If you are ever in the unfortunate situation where your token thats issued when you create an Azure Static Web App is unobtainable or destroyed and you are trying to CI/CD from your Repo in GitHub you will get an error in your deployment pipeline in GitHub Actions. To remedy the issue you can reset your Token in the Azure Portal and then create a new GitHub Secret in the Repo with the new reset token GUID and you will be all sorted. Want to see how, keep reading…

Deployment Error in GitHub

How did I get here

My story begins when I was unable to log into my GitHub account and had Multi-Factor Authentication turned on, I had personal access tokens but none of the 15-something I had in my text file would work so I contacted GitHub support. Long story short, while they were professional and communicative, they did not help me much

GitHub Support Email 1

NB

Once your account is released you will loose all of your Private Repos…

GitHub Support1

In the end I did provide proof of who I am and within minutes, my old accoutn was released, I created a new one, and poof Im back again under https://github.com/fabianwilliams

Where my CI/CD Failed

Another side effect of that is that GitHub Secrets that were in any private Repo is now invaidated and any CI/CD pipeline will fail, if you did create a new Repo under the old name, yes the names will match so the pipeline will start but once it gets to the deployment check for tokens, unless you set it to skip that check you are toast!

Deployment Error in GitHub 2

How to Remedy

The remedy for this is not that hard actually and there is a great blog post that talks you through it located here Reset deployment tokens in Azure Static Web Apps

Lesson Learned

If you enable MFA in GitHub and you have CI/CD going on or anything like WebHooks, Automation Tasks that uses Tokens/Secrets do back them up in multiple places to be safe and even generate new ones to be safe. In my case I did have personal tokens but they did not work and one reason could be that I used them all up before without getting new ones IDK really. But I did spend like 2 days looking in 3 different computers locally and even several OneDrive and Google Drives to see if i stored any there. The fact that you are reading this blog post shows that I am up and running again. Let my pain not be your pain.

Chat about this?

Engage with me Click
Twitter Static WebApp CICD Gotcha
LinkedIn Static WebApp CICD Gotcha

Or use the share buttons at the top of the page! Thanks

Cheers! Fabs


  1. Reset deployment tokens in Azure Static Web Apps [return]

Recent Posts

Categories

About

Fabian G. Williams aka Fabs Site