Prerequisites
- A static website (should contain only HTML, CSS, and JavaScript files).
- Visual Studio Code
- Azure Static Web Apps extension
- Active Azure subscription
- GitHub account
Step - 1: Selecting subscription
- Open the Azure extension by clicking on the Azure logo in the left side panel. (Make sure you signed in to your Azure and GitHub accounts in VSCode.)
- Select the
+
sign under the Static Web Apps section. - Select your subscription and press enter.
Step - 2: Add your app
- Name your application and press enter.
- Choose a region near you.
- Select "Custom" and choose your app files location (For example,
/src
or/
). - Write the output directory if your app generates build output. If not, leave it empty.
Step - 3: Monitor deployment and your website is online
- Right-click on "Actions" -> Open in GitHub and see the deployment workflow.
- If you see a green check then your website is live.
Congrats 🎉! Share your URL in the comments below.