Steps to Deploy a Web App with CI/CD pipeline on Azure App Service

Chidera Enyelu - Aug 9 - - Dev Community

Deploying a web application with a CI/CD pipeline on Azure App Service using GitHub involves several steps. Here's a detailed guide to help you through the process:

Step 1: Create an Azure App Service

Login to Azure Portal:

  • Go to the Azure Portal.
  • Login with your Azure credentials.

Create a New Resource:

  • In the Azure portal, click on "Create a resource".
  • Search for "App Service" and select it.
  • Click "Create" to start the configuration.

Configure the App Service:

  • Subscription: Choose your Azure subscription.
  • Resource Group: Either create a new resource group or use an existing one.
  • Name: Enter a unique name for your App Service.
  • Publish: Select "Code".
  • Runtime Stack: Choose the runtime stack that your application uses (e.g., .NET, Node.js, Python).
  • Operating System: Select the OS (Windows/Linux).
  • Region: Choose a region where the App Service will be hosted.
  • Pricing Tier: Choose a pricing tier based on your needs (e.g., Free, Shared, Basic). Review and Create:
  • Click on "Review + Create" to validate your settings.
  • Once validation passes, click "Create".

Image description

Image description

Image description

Step 2:Create and configure webapp

  • In the basics tab, choose a resource group and name.
  • choose a programming language(PHP).
  • Review and create

Image description

Image description

Step 3: Set Up GitHub Actions for CI/CD

**Create your repository, add a README file
After creating, copy the url created

Step 4: Virtual studio code

  • On the visual studio code, on the search bar,type the repostory name you created and open.
  • Switch your terminal to gitbash. run these commands mkdir project cd project
    • Open the folder on the VSCode. run the above linux commands cd mywebapp touch index.php nano cat index.php

Image description

NOTE: Remember to stage and commit yor git
git add .
git commit -m"comment"
git init

Step 5: On the webapp page in your azure portal

  • Go to deployment center
  • Fill and save

Image description

Image description

By following these steps, you should have a fully operational CI/CD pipeline for your web app on Azure using GitHub Actions. This setup automates the process of building, testing, and deploying your application whenever you push changes to your repository.

. . . . . . . . . . .
Terabox Video Player