Parv Sharma

sharmaparv.2004@gmail.com·+91 62807 30669·parvsharma.in·linkedin·github


December 10, 2025

Building a CI/CD Pipeline from Scratch

When I joined Furious Warrior, there was no CI/CD. Deploys were manual, scary, and inconsistent. Here's how I set one up and what I learned.

// The goal

Every push to main should:

1. Run tests

2. Build the Docker image

3. Push to registry

4. Deploy to the server

Simple in theory. The devil is in the details.

// Tools I chose

- GitHub Actions — free for public repos, simple YAML config, tight GitHub integration

- Docker — consistent environments between dev and prod

- AWS ECR + EC2 — image registry and compute

// What went wrong

Secrets management: I initially hard-coded environment variables in the workflow file. Bad. Moved everything to GitHub Secrets immediately.

Long build times: The initial pipeline took 8 minutes because node_modules wasn't cached. Added caching and got it down to under 2 minutes.

No rollback plan: First deploy of a broken image took down the service. Added a health check step and a rollback trigger.

// What I'd do differently

Start with the rollback strategy. It's easy to skip when you're moving fast, and painful to add after the fact.

Also: write the pipeline *before* the app is done. It forces you to think about how the app will run in production from day one.

// Result

After the pipeline was live, deploys went from a 30-minute manual process (test locally, build, ssh, restart) to under 3 minutes, fully automated. Confidence in releases went up significantly.


← back to blog