Skip to content

About

Production-grade CI/CD pipeline for React apps automated lint, build, and AWS deployment via GitHub Actions.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

CI/CD Pipeline React + AWS Deployment

A production-grade GitHub Actions pipeline for automating build, test, lint, and cloud deployment of React applications.

CI/CD React Vite AWS ESLint


Overview

This repository provides a fully automated CI/CD pipeline built with GitHub Actions for React applications using Vite. It covers the complete delivery lifecycle from code commit to cloud deployment with zero manual intervention.

Designed for teams and engineers who want a reliable, repeatable, and professional deployment workflow without the overhead of complex DevOps tooling.


Pipeline Architecture

Push / Pull Request
        │
        ▼
┌───────────────────┐
│   Lint & Validate  │  ← ESLint static analysis
└────────┬──────────┘
         │
         ▼
┌───────────────────┐
│   Build & Test    │  ← Vite production build
└────────┬──────────┘
         │
         ▼
┌───────────────────┐
│   Deploy to AWS   │  ← S3 sync + CloudFront invalidation
└───────────────────┘

What This Pipeline Does

Stage Action Trigger
Lint Runs ESLint across all source files Every push and PR
Build Compiles and bundles via Vite Every push and PR
Deploy Syncs build artifacts to AWS S3 Push to main only
Invalidate Clears CloudFront CDN cache Post-deploy on main

Tech Stack

Layer Technology
Frontend Framework React 18
Build Tool Vite
CI/CD Automation GitHub Actions
Cloud Storage AWS S3
CDN AWS CloudFront
Code Quality ESLint

Getting Started

1. Clone the Repository

git clone https://github.com/ahmedrazakhann/cicd-pipeline-react-aws.git
cd cicd-pipeline-react-aws

2. Install Dependencies

npm install

3. Run Locally

npm run dev

4. Run Linter

npm run lint

5. Production Build

npm run build

GitHub Actions Setup

Configure the following secrets in your repository under Settings → Secrets and Variables → Actions:

Secret Description
AWS_ACCESS_KEY_ID AWS IAM access key
AWS_SECRET_ACCESS_KEY AWS IAM secret key
AWS_REGION Target AWS region (e.g. us-east-1)
S3_BUCKET_NAME Target S3 bucket for deployment
CLOUDFRONT_DISTRIBUTION_ID CloudFront distribution ID for cache invalidation

Workflow File Location

.github/
└── workflows/
    └── deploy.yml   ← Main CI/CD pipeline

Why This Exists

Most deployment pipelines are either too complex for small teams or too simple for production environments. This pipeline sits precisely in the middle — straightforward enough to understand in one read, robust enough to deploy real applications with confidence.


Author

Ahmed Raza Khan Full-Stack Engineer · AWS Certified ML Associate

theahmedraza.com · LinkedIn · ahmed@theahmedraza.com


Built with precision. Deployed with confidence.

About

Production-grade CI/CD pipeline for React apps automated lint, build, and AWS deployment via GitHub Actions.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages