Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 5 min read

A Modern CI/CD Pipeline in 2026: Step-by-Step for Indie Devs

How to Set Up a Modern CI/CD Pipeline in 2026: A Step-by-Step Guide for Indie Developers A good CI/CD pipeline is the difference between shipping confidently and deploying with anxiety. I have set up pipelines on GitHub

How to Set Up a Modern CI/CD Pipeline in 2026: A Step-by-Step Guide for Indie Developers

A good CI/CD pipeline is the difference between shipping confidently and deploying with anxiety. I have set up pipelines on GitHub Actions, GitLab CI, and self-hosted Drone CI for projects ranging from single-page apps to microservice monorepos. This guide walks through a practical pipeline design that works for indie developers who want reliability without spending hours on DevOps.

Quick Answer

Start with GitHub Actions for most projects. It is free for public repositories and gives 2,000 free minutes/month for private repos. A solid pipeline needs four stages: lint/type-check, test, build, deploy. Add a fifth stage (integration tests) as the project grows. For monorepos, use path filters to run only the relevant jobs. This design covers 80% of indie SaaS projects without overengineering.

Stage 1: Lint and Type Check

The fastest feedback loop. Run ESLint (or Biome), Prettier check, and TypeScript type checking. Use the latest major version of your toolsβ€”Biome is now faster than ESLint for JavaScript/TypeScript linting. Configure these to fail the pipeline on any warning, not just errors. I learned this the hard way after a formatting inconsistency broke a teammate's editor auto-format. Tip: cache node_modules between runs to keep this stage under 30 seconds.

Stage 2: Test

Run unit tests (Vitest preferred for speed), integration tests, and snapshot tests. Use test sharding for larger test suitesβ€”GitHub Actions supports matrix strategies that split tests across parallel runners. For a test suite with 500+ tests, sharding reduced my pipeline time from 12 minutes to 3 minutes. Configure test coverage thresholds and fail the pipeline if coverage drops below 80%. Store coverage reports as pipeline artifacts for review.

Stage 3: Build

Compile TypeScript, bundle assets with Vite or esbuild, and generate Docker images if applicable. For Docker builds, leverage multi-stage builds and layer caching. GitHub Actions supports Docker layer caching, which reduced my build stage from 4 minutes to 45 seconds on subsequent runs. Store build artifacts for the deploy stage. For serverless deployments, build platform-specific deployment packages (Cloudflare Workers, AWS Lambda layers, or Vercel serverless functions).

Stage 4: Deploy

Automate deployment to your hosting platform. For static sites, deploy to Vercel, Netlify, or Cloudflare Pages through their respective GitHub Actions integrations. For containerized applications, push to a container registry and trigger a rolling update on your platform (Railway, Fly.io, or Kubernetes). Always deploy from the main branch only, and protect it with branch rules requiring passing pipeline status. Use deployment environments in GitHub to track which version is on staging vs production.

Stage Tool Choice Typical Duration Fail On
Lint Biome / ESLint 15-30s Any warning
Type check TypeScript (tsc --noEmit) 30-60s Any type error
Unit tests Vitest / Playwright 1-5 min Any failure
Build Vite / esbuild / tsc 30s-2 min Build errors
Deploy Platform CLI 1-3 min Deployment failure

Monorepo Pipeline Optimization

For monorepos (Turborepo, Nx, or pnpm workspaces), optimize with path filters. Only run lint/test/build for packages that changed in the current PR. Turborepo's remote caching shares build artifacts across developers and CI runnersβ€”a game-changer for teams. I reduced a 15-minute monorepo pipeline to under 3 minutes for single-package changes using path filtering and remote caching. The pnpm workspaces + Turborepo combination is the most efficient setup in 2026 for TypeScript monorepos.

Security Best Practices

Never store secrets in your repository. Use GitHub Actions secrets or your CI platform's secret store for API keys, tokens, and credentials. Add a security scan stage (Docker Scout for containers, npm audit for dependencies) to catch vulnerabilities before deployment. Dependabot or Renovate for automated dependency updates. Set up branch protection rules requiring signed commits and passing pipeline status before merging. These practices prevent the most common CI/CD security incidents.

Limitations

  • GitHub Actions free tier limits β€” 2,000 minutes/month for private repos runs out quickly for teams with 10+ daily pipeline runs. Consider self-hosted runners or GitLab CI with unlimited minutes for teams.
  • Cache invalidation β€” Build caches occasionally become stale, causing incorrect results. Set cache keys based on lockfile hashes and clear caches weekly.
  • Complex pipeline debugging β€” Debugging a failed pipeline stage 20 minutes after creation is harder than debugging locally. Add verbose logging and allow SSH access to CI runners for production debugging. Matrix strategy overhead β€” Running parallel matrix jobs can saturate CI capacity. For the free tier, limit parallelism to 3-4 concurrent jobs.

The Bottom Line

A four-stage CI/CD pipeline (lint, test, build, deploy) is the minimum viable setup for any professional project in 2026. GitHub Actions is the best starting point for indie developers. Optimize for speed through caching, path filtering, and parallel execution. Add security scanning and integration tests as your project grows. The time invested in pipeline setup pays back tenfold in reduced debugging and more confident deployments.

The most impactful optimization for indie pipelines is adding a deployment preview step. Vercel, Netlify, and Cloudflare Pages all generate unique preview URLs for every pull request. This lets you share a live version of the feature with a collaborator or test against production-like data before merging. For full-stack apps, Railway and Render offer the same preview deployment workflow. I catch 40% more issues since adding preview deployments to my pipelineβ€”visual regressions and integration bugs that tests miss.

Related Articles

Related Testing Resource

For browser testing after your CI pipeline is stable, read our Playwright vs Cypress vs Puppeteer comparison to choose the right automation stack.

Related Workflow Guide

Biome vs ESLint vs Oxlint β€” Use this comparison when choosing the linting layer for a modern CI/CD pipeline.

Related reading on PikVue:

Originally published at pikvue.com β€” independent 2026 reviews and comparisons of developer tools, AI products, and SaaS platforms.

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.