Skip to content

CI CD Pipeline

Jay Mathukiya edited this page Apr 14, 2025 · 1 revision

CI/CD Pipeline (GitHub Actions)

The project utilizes GitHub Actions for automated Continuous Integration (CI) and Continuous Deployment (CD) to Azure Web Apps.

Workflows

  1. Build Docker Image (docker-image.yml - or actual filename)
    • Trigger: Typically runs on pushes or merges to the main branch.
    • Purpose: To build the production-ready Docker image for the Next.js frontend.
    • Key Steps:
      • Checks out the source code.
      • Logs into GitHub Container Registry (GHCR) using the automatic GITHUB_TOKEN.
      • Builds the Docker image using the project's Dockerfile (leveraging multi-stage builds and output: 'standalone').
      • Tags the image with latest and the specific Git commit SHA.
      • Pushes the tagged images to GHCR (ghcr.io/jay-021/SoloType/solotype-frontend).
  2. Deploy to Azure (azure-container-webapp.yml - or actual filename)
    • Trigger: Often triggered after the build workflow completes successfully, or directly on pushes/merges to main.
    • Purpose: To deploy the newly built Docker image to the Azure Web App service.
    • Key Steps:
      • Logs into Azure using credentials stored securely in GitHub Actions Secrets (AZURE_CREDENTIALS).
      • Uses the azure/webapps-deploy action to target the specific Azure Web App (app-name).
      • Specifies the exact image to deploy from GHCR using the commit SHA tag (images: ghcr.io/...:${{ github.sha }}).
      • Azure Web App pulls the specified image from GHCR using credentials (GitHub PAT) configured in its Application Settings.

This automated pipeline ensures that every change merged into main is automatically built, containerized, and deployed to the live environment on Azure.


Clone this wiki locally