How to deploy your Astro site to the web using Microsoft Azure.
Azure is a cloud platform from Microsoft. You can deploy your Astro site with Microsoft Azure’s Static Web Apps service.
This guide takes you through deploying your Astro site stored in GitHub using Visual Studio Code. Please see Microsoft guides for using an Azure Pipelines Task for other setups.
Prerequisites
Section titled “Prerequisites”To follow this guide, you will need:
- An Azure account and a subscription key. You can create a free Azure account here.
- Your app code pushed to GitHub.
- The SWA Extension in Visual Studio Code.
How to deploy
Section titled “How to deploy”The GitHub Action will deploy your app (you can see its progress in your repo’s Actions tab on GitHub). When successfully completed, you can view your app at the address shown in the SWA Extension’s progress window by clicking the Browse Website button (this will appear after the GitHub Action has run).
Known Issues
Section titled “Known Issues”The GitHub action yaml that is created for you assumes the use of node 14. This means the Astro build fails. To resolve this update your projects package.json file with this snippet.
"engines": { "node": ">=22.12.0" },