/ASWA-AutoPilot-Sample

This provides sample GitHub Actions workflows and Bicep files for devs to autopilot Azure Static Web Apps from resource provisioning to app deployment in one-click.

Primary LanguageBicepMIT LicenseMIT

ASWA AutoPilot Sample

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.

Getting Started

Auto-Pilot via Azure Portal

Make sure that the autopilot through Azure Portal only provision resources.

Deploy To Azure

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.

Auto-Pilot via GitHub Actions

To run this autopilot through GitHub Actions, you need to add the following two secrets to your repository:

  • AZURE_CREDENTIALS for Azure CLI
  • PA_TOKEN for Azure Static Web App deployment

Once both secrets are ready, then follow the steps below:

GitHub Actions Autopilot

  1. Go to the "Actions" tab.
  2. Click the "Autopilot" tab.
  3. Click the "Run workflow" button.
  4. Enter the resource name.
  5. Choose the Cosmos DB location.
  6. Choose the Azure Static Web App location.
  7. 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.

Azure Static Web App