Step 9 - Deploy to production
Create the resource on your chosen platform and connect the repository
Create the resource on your chosen platform and connect the repository:
- In the Azure portal, search for Static Web Apps and click Create.
- Choose your subscription and resource group and give the resource a name.
- Under Plan select Free or Standard (Standard is required for auth with Entra ID).
- Under Deployment details select GitHub and authorize access.
- Select your organization, repository and branch (
main). - Under Build Details:
- App location:
/ - Api location: (empty)
- Output location:
out
- App location:
- Click Review + create → Create.
Azure will automatically create the AZURE_STATIC_WEB_APPS_API_TOKEN secret in your GitHub repository and run the first deployment.
Once deployed, configure a custom domain under Custom domains in the resource.
After the first successful deployment, every push to main will update the site automatically within a few minutes.