# Deploying Static Websites with CI/CD: GitHub + AWS CodePipeline

## Overview

This week, I dove into the world of DevOps by setting up a **CI/CD pipeline** to automatically deploy a static website every time I push changes to GitHub. The goal was to streamline the deployment process and eliminate manual uploads — and it worked like a charm!

Whether you're a beginner or just getting into automation, this guide will give you a quick overview of how I achieved this using **GitHub, AWS CodePipeline, CodeBuild, S3**, and **CloudFront**.

---

## What I Built

I created a simple **static website** using plain HTML and CSS. Here’s the flow of the deployment process I implemented:

1. **Code on GitHub** – Version-controlled and easy to manage.
    
2. **AWS CodePipeline** – Triggers automatically whenever I push to the main branch.
    
3. **CodeBuild** – Optional for static sites, but I used it for future scalability (e.g., compiling assets or linting).
    
4. **S3 Bucket** – Hosts the static files as a public website.
    
5. **CloudFront** – Ensures fast, global content delivery via CDN.
    

---

## Tools & Services Used

* **GitHub** – Code hosting and version control
    
* **AWS CodePipeline** – Orchestrates the CI/CD process
    
* **AWS CodeBuild** – Handles the build stage (even for static projects)
    
* **Amazon S3** – Static site hosting
    
* **Amazon CloudFront** – Content Delivery Network (CDN) for speed
    
* **IAM (Identity & Access Management)** – Ensures secure communication between services
    

---

## Key Takeaways

* 🔁 **Fully automated deployments** = no more manual uploads — just push to GitHub and done!
    
* 🌍 **S3 + CloudFront** = blazing fast delivery, anywhere in the world
    
* 🔐 **IAM roles** are critical in securely allowing services like CodePipeline and CodeBuild to interact with S3 and other AWS resources
    

## Final Thoughts

Setting up CI/CD for a static website might seem like overkill at first — but once it’s up and running, it saves tons of time and ensures consistency in your deployments. I
