This all started out as a bit of vibe coding* in ChatGPT…
Yesterday, whilst walking the dog, I was listening to the latest episode of WB-40. Something Julia Bellis said gave me an idea for a simple custom GPT to help people (well, mostly me) eat better. ChatGPT helped me to create a custom GPT – which we named The Real Food Coach.
With the GPT created, I asked ChatGPT for something else: help me build a one-page website to link to it. In minutes I had something presentable: HTML, styling, fonts, icons – all generated in a few minutes. Pretty slick.
When it came to hosting, ChatGPT suggested something I hadn’t used previously: Azure Static Web Apps, rather than the Azure Storage Account route I’d used for hosting in the past. It sounded modern and neat – automatic GitHub integration, free SSL, global CDN. So I followed its advice.
ChatGPT was great. Until it wasn’t.
A quick win turns into a slow burn
The proof of concept came together quickly – code committed to GitHub, site created in Azure, workflow generated. All looked good. But the deploys failed. Then failed again. And again.
What should have taken 10 minutes quickly spiralled into a full evening of troubleshooting.
The critical confusion
The issue came down to two settings that look similar – but aren’t:
- Deployment source – where your code lives (e.g. GitHub)
- Deployment authorisation policy – how Azure authenticates deployments (either via GitHub OIDC or a manually managed deployment token)
ChatGPT had told me to use GitHub for both. That was the mistake.
Using GitHub as the authorisation method relies on Azure injecting a secret (AZURE_STATIC_WEB_APPS_API_TOKEN
) into GitHub, but that never happened. I tried regenerating it, reauthorising GitHub, even manually wiring in deployment tokens – all of which conflicted with the setup Azure had created.
The result? Deploys that failed with:
“No matching Static Web App was found or the API key was invalid”
Eventually, after several rounds of broken builds, missing secrets, and deleting and recreating the app, I questioned the advice ChatGPT had originally given. Sure enough, it confirmed that yes – the authorisation policy should have been set to Deployment Token, not GitHub.
Thanks, ChatGPT. Bit late.
The right setup
Once I created the app with GitHub as the deployment source and Deployment Token as the authorisation policy, everything clicked.
I copied the token from Azure, added it to GitHub secrets, updated the workflow to remove unnecessary build steps, and redeployed.
Success.
Custom domain and tidy-up
Pointing my subdomain to the Static Web App was easy enough. I added the TXT record for domain verification, removed it once verified, and then added the CNAME. SSL was provisioned automatically by Azure.
I now have a clean, simple landing page pointing to my custom GPT – fast to load, easy to maintain, and served via CDN with HTTPS.
Lessons learned
- ChatGPT can take you far, fast – but it can also give you confidently wrong advice. Check the docs, and question your co-pilot.
- Azure Static Web Apps is fantastic for a simple website – I’m even using the free tier for this.
- Authorisation and deployment are not the same thing. Get them wrong, and everything breaks – even if the rest looks correct.
- Start again sooner – sometimes it’s faster to delete and recreate than to debug a half-working config.
- DNS setup was smooth, but your DNS provider might need you to delete the TXT record after verification before you can create a CNAME).
Where is this website?
You can check out The Real Food Coach at realfood.markwilson.co.uk – and chat with the GPT at chat.openai.com/g/g-682dea4039b08191ad13050d0df8882f-the-real-food-coach.
*Joe Tomkinson told me that’s what it is. I’d heard of vibe coding but I thought it was something real developers do. Turns out it’s more likely to be numpties like me…