DEV Community

Cover image for How to Deploy a Static Webapp on Azure Static app.
Grace Amole
Grace Amole

Posted on

How to Deploy a Static Webapp on Azure Static app.

In today's post, I am going to be showing how to deploy a static web app on Azure Static App. Before we proceed, Let me quickly explain what Azure Static App does.

Azure Static Web Apps is a service that automatically builds and deploys full stack web apps to Azure from a code repository.

To continue with this tutorial , you will need

  1. An Azure subscription. In case you do not have a subscription, get it here.
  2. A github account and a static HTML File. The resource used for this tutorial can be found here

Step 1 : Create Azure Static Web App

After a successful login to your account, click on create resource.

create azure app

in the search bar, type in static app, then click on static web app, then click on create.

Step 2: Configuring the Azure Static App

create a static app

Under resource group, create a new resource group

Under static web app details, enter the name of your static Web App

Under Deployment details, select Github as your source. you will required to authorize Azure to access your Github.

Github authentication

After authorization, enter the repository and the branch that contains the code you want to deploy.

selecting file

Under build details, select custom and provide the path to where your html file is located as the app location. Then click on preview + create

preview

If successful, your azure static app should be similar to the picture above. Wait for the static app to be deployed

Once deployment is complete, you will be redirect to the page shown below. click on go to

click Resource

click on url on the right had side to redirect you to the static web app you just uploaded.

uploaded file

You will be redirected to your static app.

Static App

congratulations, you just Deployed a static web app on Azure.

Delete resource

Do not forget to delete your resource when not in use!!. You do not want to get billed.

Top comments (0)