This provides sample GitHub Actions workflows and Bicep files for devs to autopilot Azure Static Web Apps from resource provisioning to app deployment in just one mouse click.
Make sure that the autopilot through Azure Portal only provision resources.
Then, run the following PowerShell script to deploy the app:
./infra/Deploy-App.ps1
NOTE: You need GitHub CLI to run the PowerShell script.
OH WAIT! IT'S TWO STEPS!
Don't worry. Here's another one for you.
To run this autopilot through GitHub Actions, you need to add the following two secrets to your repository:
AZURE_CREDENTIALS
for Azure CLI- For more details, read this document.
PA_TOKEN
for Azure Static Web App deployment- For more details, read this document.
Once both secrets are ready, then follow the steps below:
- Go to the "Actions" tab.
- Click the "Autopilot" tab.
- Click the "Run workflow" button.
- Enter the resource name.
- Choose the Cosmos DB location.
- Choose the Azure Static Web App location.
- Click the "Run workflow" button.
Once completed visit the Azure portal, find the newly created resource group, open the Azure Static Web App URL, then you will see the app is automatically provisioned and deployed.