The Wayback Machine - https://web.archive.org/web/20241006185050/https://www.geeksforgeeks.org/microsoft-azure-deploy-a-static-web-app/
Open In App

Microsoft Azure – Deploy a Static Web App

Last Updated : 30 Mar, 2023
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

This is a new offer in the app service family called static web apps. Static web apps is a tailored offer designed for static web apps full stack javascript web apps with static front-ends and optional dynamic back-ends powered by serverless APIs in our case implemented with azure functions. Static web apps are a preview offer.

Azure makes it really easy to get started. Azure asks for minimal information to create this static web app resource right through the portal. Azure asks for a resource group and for the name of your app. Static web apps Ask for a region, and this is just to provision functions the actual Static content is geo-distributed.

Static web apps have a very deep connection with GitHub because Azure wants to empower developers to use open-source tools.

First, connect to your GitHub repo by signing into your GitHub account and selecting the repo for your demo. Also, select a branch that you want to associate with production deploy deployment. If you have the opportunity to inform static web apps of your app location, API location, or the location of your build artifacts, in this case, the default configuration is fine. So, you can move forward with the creation of your app and will get a notification when your resource is created. Connection with GitHub allows you for effortless transitions back and forth between the azure portal management experience And the actual development experience that is tied to Github. You can see that your resource features a URL for the web app that was provisioned but it also has deep links to GitHub and Azure generates a workflow file in Github that informs Github actions for ci/cd.

If you follow that link you will see the work of the file that you generated actually matches the specific resource that was just provisioned within that workflow file. Azure provides you with complete transparency about the build and deployment and you also have the opportunity to customize and inform their platform about how you would like us to handle your code assets. 

Again, you notice that you have Multiple code assets. So this is a React-based app and also has the API that is powered by azure functions and follows the azure functions programming model. So you will see configuration elements that are specific to azure functions Now, GitHub actions show the status of your deployment. It shows you, how you are progressing through all of the build and deployment steps and because there is full transparency in your repo, you also have an audit log for all of the different steps that Azure has taken for your app.

This is now completed so you can go back to the Azure portal and take a look at the resource. The same deep integration with GitHub is present If you create pre-production environments.  

You can do it simply by submitting a pull request if you send a pull request, you will automatically provision that pre-production environment for you and the pull request itself. Azure will tell you what you provisioned in this case. After going back to the connection between GitHub and the Azure portal. You can see Environments and you can see that you have direct access to both the branch that you deployed from in GitHub And the resources that you just provisioned to browse directly from the Azure portal.

Finally, this is the process to deploy a static web app in the Azure portal series.


Previous Article
Next Article

Similar Reads

How to Deploy React App using Azure Static Web Apps ?
Microsoft Azure is a public cloud computing platform. It provides a lot of cloud services to access, manage, and deploy applications. Where as Azure Static Web App is one of the services of Microsoft Azure. It automatically builds and deploys full-stack web apps from the code repository to azure. In this article, we will learn how to deploy React a
3 min read
Microsoft Azure - Build and Deploy App with Azure SDK For Java
In this article, we will learn how to build and deploy our first app with the Azure SDK for Java. We can run almost any type of application in Azure including Java applications. The Azure SDKs are collections of libraries built to make it easier to use Azure services from your language of choice. These libraries are designed to be consistent, appro
3 min read
Microsoft Azure - Getting started with Azure Static Web Apps
Azure Static Web App is a Serverless Web Application offered by Azure to host Static Site Content like Images, Videos, and Code files like HTML, CSS, JavaScript, Markdown, Text files, JSON, XML files with high efficiency and it is pre-rendered content is distributed globally. No Web Services are required for deploy so it is cost-effective. So no ne
4 min read
Microsoft Azure - Deploy a new VM to Azure using ARM
Pre-requisites: Azure Azure Resource Manager is referred to as ARM. It is an Azure management platform that offers a centralized method for deploying, managing, and monitoring resources in Azure. ARM enables enterprises to improve resource organization and control, deliver applications consistently and predictably, and manage resources more quickly
6 min read
Microsoft Azure - Deploy Azure Functions using VS Code
In this article, we will learn how to deploy Azure functions with Visual Studio Code. To deploy an Azure function out from within Visual Studio Code, we are going to open the command palette. Now follow the below steps to deploy the Azure function: Step 1: First, we are going to type "deploy function" in the command palette and select the option fr
2 min read
Microsoft Azure - How To Deploy VM in Azure using Terraform?
Pre-requisite: Azure, Terraform This article demonstrates how to use Terraform to build a complete Linux environment with all the necessary resources. A virtual network, subnet, public IP address, and other resources are among them. Terraform is an open-source tool for building, changing, and versioning infrastructure safely and efficiently. It may
2 min read
Microsoft Azure - Mount Azure Storage in Container App In App Service
In this article, we are going to learn how to mount Azure Storage as a local share for App Services Linux web apps. Implementation: So to start the process of connecting to Azure Storage mount, you should click on configuration. Once you are inside the configuration blade, click on path mappings. Start by giving it a name. For eg name it s1share. A
3 min read
Microsoft Azure - App Settings in Azure App Services
In this article, you will learn how to work with App Settings in Azure App Service. In Azure Application Services, you can use App Settings to store and change configuration information without having to change any of your application code. Implementation: Follow the below steps to work with App settings in the Azure App service: Step 1: If you go
2 min read
Microsoft Azure- Backing Up, Restoring, and Cloning Microsoft Azure App Services
Microsoft is well known for developing relevant software which are using in today's time of technology to conquer the demand of users and developers to build up applications. In sequence of it Microsoft introduces Azure well known as Microsoft Azure to make quality applications. In this article, we will discuss Backing up, restoring and cloning Mic
8 min read
Microsoft Azure - Cloning Web Apps using Azure App Services
In this article, we will look into the process of cloning web apps in Azure App Services. If you have an existing application in Azure App Services that you like to have copied over into another region, one option you have is to simply clone it. Follow the below steps to clone and Azure App to another region: Step 1: In the search bar search "clone
2 min read
Microsoft Azure - Hosting a Static Website with Azure Storage
Azure storage stores all types of data. It is mainly designed for storage where we can easily store both structured and unstructured data. In Microsoft Azure, you can easily upload your static website and share the link anywhere and anyone can see your website, you can manage your access control. Html, CSS, and JavaScript you can put your code on t
3 min read
Microsoft Azure - Using Blazor and C# to Host a Static Website in Azure Storage
Pre-requisite:- Azure Ever hosted a static website like a blog or a simple information website, That can be a hassle and expensive, Blazor is a cool, new feature of ASP.NET that allows you to build interactive web UIs using C# instead of JavaScript. And you can run your client-side C# code directly in the browser, using Web Assembly which is a stan
5 min read
Microsoft Azure - Get Azure VM Properties using Azure PowerShell
The purpose of using the Azure PowerShell Commands is to quickly analyze the overall properties of VM/VMs at once the filtering the with select and where conditions. To find the properties of an Azure VM, you can perform the following commands in Azure Cloud Shell to get the details. Command: Get-AzVM Output: 1. Get all properties of an Azure Virtu
2 min read
Microsoft Azure - RDP to Azure Virtual Machines using Azure Bastion
In this article, we will learn how to do RDP(Remote Desktop Protocol) / SSH(Secure Shell) Connection to an Azure VM using Azure Bastion. First, let's discuss Azure Bastion. The Azure Bastion service is a fully platform-managed PaaS service that you provision inside your virtual network. It provides secure and seamless RDP/SSH connectivity to your v
3 min read
Microsoft Azure - Configure Azure SQL with Azure CLI
In this article, we're going to take a closer look at how you can configure something like connectivity using the Azure CLI. What we have here is we are in Azure Data Studio and similar to the SQL notebook we are actually using a PowerShell notebook. That just means all our code cells are going to run PowerShell and we are just connecting to localh
4 min read
Microsoft Azure - Get CPU Utilization Data of a Azure VM in Azure Portal
Azure Virtual Machines (VM) is one of several types of on-demand, scalable computing resources that Azure offers. In this article, we will look into the process of getting the CPU Utilization data of an Azure VM in Azure Portal. Implementation: Follow the steps to get the CPU Utilization of an Azure VM in Azure Portal: Step 1: Log in to your Azure
2 min read
Microsoft Azure - Archive Azure VM to Azure Storage Account
In this article, we will be implementing a solution to archive a select azure VM snapshot to a select storage account for archiving using azure cloud shell. For implementation, we will be using Azure CLI commands. Prerequisite:VM SnapshotA storage account is neededUser needs "Storage Blob Contributor Data" IAM Role Access on Archiving Storage Accou
2 min read
Microsoft Azure - Check Status of Azure VM using Azure PowerShell
The following Azure PowerShell command helps you to find the Azure VM Config and properties details of Os Name, Os Version, Hyper V Generation, Disks properties, Extensions properties of Type Handler Version, Status and Message, VM Agents properties of Type Handler Version, Status and Message and also VM Power Status Codes, Messages, Plugins, Time
3 min read
Microsoft Azure - Azure VM Disk Space in Percentage using Azure KQL
Here we'll be using the Azure Insights Metric Query to find the free disk space in percentage using KQL. The purpose of this query is to find disk drive free space of all the Azure VMs without logging into every server. You can Run the following KQL log Queries in Azure Monitor or Azure VM Logs or Log Analytics Workspace. Note: VM Insights Agent sh
1 min read
Microsoft Azure - Enable Azure Monitor VM Insights Agent For Azure VM
Azure Monitor VM Insights Agent enables you to get more visibility into the health and performance of your Azure VM. Here we'll see how we can enable Azure Monitor VM Insights to monitor the health, performance, and dependencies of azure virtual machines. Implementation: Follow the below steps to enable Azure Monitor VM insights agents for an Azure
2 min read
Microsoft Azure - Azure CLI Commands to Manage Azure VMs
Azure Command-line interface is used to manage or to create Azure resources. By using the simple AZ CLI command we can manage Azure VM quickly and at a Scale. Let's get started by using a few important Azure CLI commands to manage Azure Virtual Machines. 1. Start a Specific Stopped VM in a Select Resource Group Use the below command to start a spec
2 min read
Microsoft Azure - Manage Azure VMs using Azure PowerShell Commands
Here we are using Azure PS Commands to manage azure resources from Azure Cloud Shell or by using Windows PowerShell. By using the simple AZ PS command we can manage Azure VM Quicks without any efforts of navigating in Azure Portal and at Scale. Let's get started by using the major Azure PS commands to manage Azure Virtual Machine. 1. Start a Specif
2 min read
Microsoft Azure - Query Azure Storage Logs in Azure Monitor Log Analytics
Pre-requisite:- Azure Log Analytics is a tool offered by Azure, which is used to edit and run log queries against data in the Azure Monitor Logs store and helps interactively analyze their results. One can easily use Log Analytics queries to retrieve records that match particular criteria, identify trends, analyze patterns, and provide various insi
5 min read
Microsoft Azure - Install Azure Command Line Interface (Azure CLI)
Azure CLI is a very powerful tool that can be used to automate tasks, create, update, manage or delete azure resources or to troubleshoot problems with az module cmdlets. By installing az modules on your system or on your development system you and your development team can easily create, update or manage Azure AD and Azure resources such as manage
4 min read
Microsoft Azure - Using Github Action in Azure App Service
In this article, we will learn how to use GitHub Actions from Azure App Service. GitHub Actions enables us to automate builds and deployments which results in better quality software. For the purpose of demonstration, let's use it from this Azure App Service Web App that we've already created. This is a new web app, and we haven't deployed an app i
2 min read
Microsoft Azure - Azure App Service Managed Certificates
In this article, we will learn what you can do with the Azure CLI Interactive Mode. You can do a lot of powerful things with the Azure CLI like create web apps and VMs and you can do even more with the CLI when you use its interactive mode. Let's try that. We'll try that in the Azure Cloud Shell, but you can also use an Azure CLI that is installed
3 min read
Microsoft Azure - Azure App Servers Routing using PowerShell
In this article, we will look into how to add logic to your testing and production sites with PowerShell. I Azure, you could split the traffic that goes between your staging slot on your production slot by defining routing rules inside the Azure portal. Now, what if you wanted to do this programmatically via maybe a PowerShell script. One of the th
2 min read
Microsoft Azure - Create App Service Plan For Linux (Azure CLI)
An app service plan is a subscription model for hosting apps on Azure. It allows you to host multiple apps on a single server without having to pay for each app separately. In this article, we will show you how to deploy an Azure App Service Plan for Linux service type using Azure CLI (Command Line Interface) from Azure Portal in simple easy steps.
2 min read
Microsoft Azure - Preventing Changes to Resources in Azure App Services
In this article, we will look into the process of preventing changes to resources in the Azure App Service. You can make use of locks inside of an Azure App Service to prevent other users in your organization from accidentally deleting or modifying critical resources. Follow the below steps to prevent accidental modification to Azure App service us
1 min read
Microsoft Azure - Configuring Backup For Azure App Services
In this article, we will look into the process of configuring a backup for your Azure app servers and database. Follow the below steps to create a backup for your Azure Apps and databases: Step 1: Go to your application blade and type in "backups" and click on the Backups option. Step 2: Now, we'll click on configure, and in the backup configuratio
2 min read