DEV Community

Anil Kumar S
Anil Kumar S

Posted on

How I Cut Deployment Time from 3 Hours to 45 Minutes Using GitHub Copilot & GitHub Actions

GitHub “Finish-Up-A-Thon” Challenge Submission

This is a submission for the GitHub Finish-Up-A-Thon Challenge

What I Built

Back in early 2023, I started building an internal CI/CD automation toolkit for an enterprise client project — a set of reusable GitHub Actions workflows, shell scripts, and Terraform modules designed to standardise deployments across DEV, QA, and PROD environments for 5+ microservices.

The project started strong but quickly became a half-finished collection of YAML files, half-documented shell scripts, and Terraform modules that worked in isolation but never came together as a cohesive, reusable system. Life got busy, sprint deadlines took over, and the toolkit sat at about 60% completion for months.

This challenge gave me the push to finally finish it.

Demo

The toolkit covers the full DevOps lifecycle:

  • GitHub Actions CI/CD Pipelines — Reusable YAML workflows for build, test, Docker image publish, and Kubernetes deploy
  • Terraform Modules — Modular IaC for provisioning AWS EC2, EKS, S3, IAM, VPC, Route53, ELB, EBS, EFS
  • Shell & PowerShell Scripts — Automated operational tasks across Linux and Windows environments
  • Kubernetes Manifests — Deployments, Services, ConfigMaps, and namespace management templates
  • Prometheus + Grafana — Pre-built monitoring dashboard configurations

Before: 3-hour manual deployments with environment inconsistencies and frequent merge conflicts across 30+ repositories.

After: Deployments now complete in under 45 minutes, merge conflicts reduced by 40%, and all environments (DEV/QA/PROD) are provisioned consistently via Terraform.

The Comeback Story

When I came back to this project, it was a mess:

  • GitHub Actions workflows were half-written with hardcoded values
  • Terraform state management was inconsistent across environments
  • Shell scripts had no error handling or logging
  • Documentation was nearly non-existent

Here's what I fixed and finished:

1. Parameterised GitHub Actions Workflows
Converted all hardcoded values into reusable inputs and secrets. Workflows now support multi-environment dispatch with a single workflow_call trigger.

2. Terraform State Management
Set up remote S3 backend with DynamoDB state locking for all three environments (DEV, QA, PROD), eliminating state conflicts during parallel deployments.

3. Shell Script Hardening
Added set -euo pipefail error handling, structured logging, and retry logic to all deployment and operational scripts.

4. Kubernetes Deployment Templates
Completed the Helm chart templates and namespace configuration for all 10+ application services running on EKS.

5. Documentation
Wrote a full README with architecture diagrams, usage examples, and environment setup guides.

My Experience with GitHub Copilot

GitHub Copilot (in VS Code) was a genuine game-changer for finishing this project. Here's how I used it:

YAML Generation: I described the workflow intent in a comment and Copilot generated 80% of the GitHub Actions YAML structure instantly. What used to take 30 minutes of referencing docs now takes 5 minutes of review and tweaking.

Shell Script Completion: Copilot suggested the set -euo pipefail pattern and retry loop logic I needed for robust deployment scripts — saving me from having to look up the syntax every time.

Terraform Boilerplate: Writing repetitive resource blocks for AWS (EC2, IAM roles, security groups) was dramatically faster with Copilot autocompleting module arguments based on context.

Error Debugging: When a Groovy Jenkins pipeline script was failing silently, I pasted the block into VS Code and Copilot flagged the missing try/catch and suggested a fix immediately.

The biggest win? Copilot helped me maintain context across a large, complex codebase — exactly what you need when reviving a project you haven't touched in months.

If you're a DevOps engineer and haven't tried GitHub Copilot for pipeline and IaC work — start today. It's not replacing engineers; it's making them significantly faster.


Tools used: GitHub Actions, GitHub Copilot, Terraform, AWS EKS, Docker, Kubernetes, Helm, Shell, PowerShell, Groovy, Prometheus, Grafana

Tags: #devchallenge #githubchallenge #githubcopilot #devops

Top comments (0)