Note: If you need server rendering, come back here tomorrow to learn about Azure App Service!
How do Azure Static Web Apps work?
Azure Static Web Apps allow you to build and deploy apps from repositories to the Azure hosted environments. They currently support GitHub and Azure DevOps repositories. They have a free tier for hobbies and personal projects as well as a standard tier for general purpose apps.
When creating an Azure Static Web App, you will need to know the location of your source code. Optionally, you can also specify the app’s build output – such as a dist folder – as well as the location of an API – such as a folder named api.
Note: APIs are optional, not required. If you do not have an API, your app will still be published to Azure Static Web Apps.
When you create the Static Web App, it will add a GitHub Actions workflow to build and publish your application. The app location, build output, and API location are specified in the Build and Deploy step in the GitHub workflow.
Supported Frameworks and Tools
Azure Static Apps support a variety of frameworks – including popular frameworks such as Angular, Blazor, Next.js, React, Svelte, and Vue. It also works with static website generators such as Hugo and Gatsby.
The list of frameworks is not a complete list. If you are working with static website or front-end technologies that don’t require server rendering, consider spinning up an Azure Static Web App and trying it out. For example, I recently decided to try PyScript and created an Azure Static Web App to see if it works.
Note: If you are working with technologies that don’t need to be built, look into setting skip_app_build to true in the GitHub Actions workflow.
If you want to learn more about Static Web Apps and get started using them today, check out the following resources: