Different Staging Environments In Azure Static Web Apps

Different Staging Environments In Azure Static Web Apps

Posted: 02/06/2021

Different Staging Environments In Azure Static Web Apps

I have been trying to get the initial load of my blog posts much faster, and during that work, it was annoying me that in order to test certain things like configuration, I had to push my change to production.
Normally I don't mind a push to production, but as I was experimenting I kept breaking things (the change I was making, was an Azure config change, and does not reflect locally).

This is not ideal.

In reading some more Azure documentation, I came across a reference to a "staging environment", which is also mentioned in the Free tier of the Azure Static Web Apps plans (now it is GA), and it states there are 3 available!

This finally registered with me, and I went looking for some information on the different staging environments for an Azure Static Web App.

I have had a look around the MS docs, and cannot find much where this is talked about, but I came across this article detailing how they work with Github Actions.

This is amazing!

For up-to 3 branches created, a different staging environment will be automatically created for you to test!

Who knew!

I am not going to recreate the steps here, other than to say, create a branch, create a PR, commit stuff, the PR will get updated by the github action with the Url of the staging env.

Go read the docs

Having now used it, it is seamless within GitHub and means I will no longer break the blog when trialling new ideas!

Awesome!

Benny from Lego Movie saying Awesome


Thanks for reading this post.

If you want to reach out, catch me on Twitter!

Tweet to @MicbOliver

I am always open to mentoring people, so get in touch.