-
Notifications
You must be signed in to change notification settings - Fork 0
CI CD Pipeline
Jay Mathukiya edited this page Apr 14, 2025
·
1 revision
The project utilizes GitHub Actions for automated Continuous Integration (CI) and Continuous Deployment (CD) to Azure Web Apps.
-
Build Docker Image (
docker-image.yml- or actual filename)-
Trigger: Typically runs on pushes or merges to the
mainbranch. - 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 andoutput: 'standalone'). - Tags the image with
latestand the specific Git commit SHA. - Pushes the tagged images to GHCR (
ghcr.io/jay-021/SoloType/solotype-frontend).
-
Trigger: Typically runs on pushes or merges to the
-
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-deployaction 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.
- Logs into Azure using credentials stored securely in GitHub Actions Secrets (
-
Trigger: Often triggered after the build workflow completes successfully, or directly on pushes/merges to
This automated pipeline ensures that every change merged into main is automatically built, containerized, and deployed to the live environment on Azure.