CI/CD with GitHub Actions: A Beginnerโs Guide โ DevOps Automation


๐ Introduction: From Manual Steps to Automation Magic
Like many DevOps beginners, I started with Docker, basic Linux commands, and small Python projects. But something was missing โ I was still building and testing everything manually. Every code push required me to repeat the same steps over and over again.
Thatโs when I discovered the world of CI/CD (Continuous Integration / Continuous Deployment) โ and specifically, GitHub Actions.
This blog is a beginner-friendly walkthrough of how I automated my first project using GitHub Actions, what I learned, and how you can do the same even if you're just starting out.
๐ What is CI/CD (In Simple Terms)?
Continuous Integration (CI) means:
Every time you push code, itโs automatically tested and built.
Continuous Deployment (CD) means:
If the build succeeds, it gets automatically deployed to a server or container.
In short: You push code โ magic happens ๐ฉโจ
No more manual testing, no more docker build
every single time, no more โit works on my machine.โ
CI/CD is one of the core pillars of DevOps, and GitHub Actions makes it really accessible for beginners.
๐ง Why I Chose GitHub Actions
At first, tools like Jenkins or GitLab CI looked overwhelming. Then I stumbled upon GitHub Actions, which felt like:
No separate setup โ already part of GitHub
YAML-based config (which I had already used in Docker Compose)
Free minutes for public repos
Tons of pre-built Actions (plugins)
Within minutes, I had created my first automated build!
๐ ๏ธ My First GitHub Actions Workflow
Let me show you exactly what I did to automate a simple Python + Docker project.
๐ฏ Goal:
Every time I push to the repo:
Checkout the code
Build the Docker image
Print โBuild success!โ
๐ File structure:
my-app
๐ Dockerfile
๐ app.py
๐ .github
๐ workflows
๐ main.yml
๐ .github/workflows/main.yml
:
name: CI Pipeline
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker Image
run: |
docker build -t my-first-ci-app .
echo "โ
Build Success!"
๐งช What Happened:
I pushed code to GitHub
The pipeline ran automatically
Docker image was built inside GitHubโs runner
Success message appeared in the logs
๐ก What I Learned
Here are a few valuable things I picked up:
Workflows are YAML files: indentation matters โ a lot!
You can run any Linux command inside
run: |
blocksPre-built actions save time, like
actions/checkout
ordocker/setup-buildx-action
Logs are your friend โ every step has detailed logs
You can add secrets for Docker Hub, AWS, etc.
๐ Beginner Tips
If you're just starting out:
โ Start small โ even a workflow that just prints "Hello" is a great start
๐งฑ Break it down: first build, then test, then deploy
๐ Check GitHubโs Actions Marketplace
๐ Learn how to use GitHub Secrets (for tokens, passwords, etc.)
๐ When it fails (it will!), read logs step-by-step
๐ Whatโs Next in My DevOps Journey
Now that Iโve got a grip on GitHub Actions, Iโm planning to:
๐งช Add automated testing to the pipeline
๐ณ Push Docker images to Docker Hub
โ๏ธ Deploy my app to AWS EC2 using GitHub Actions
๐ Explore multi-environment workflows (dev โ staging โ prod)
๐ Conclusion: Automate Early, Learn Faster
Learning GitHub Actions was a game-changer in my DevOps journey. It took my projects from โlocal-onlyโ to automated, repeatable, and scalable.
If you're still manually building or testing your code โ start automating today. GitHub Actions is beginner-friendly, powerful, and part of a real DevOps toolkit.
๐ฌ Have questions or want to share your CI/CD setup? Letโs connect in the comments or on LinkedIn!
Subscribe to my newsletter
Read articles from Mukul Bhardwaj directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Mukul Bhardwaj
Mukul Bhardwaj
Hi, I'm Mukul Bhardwaj โ a hands-on DevOps learner passionate about streamlining development workflows and building scalable, containerized solutions. I enjoy working with Docker, Kubernetes, GitHub Actions, and cloud tools to bring ideas to life. Currently diving deep into practical AWS, Golang for DevOps, and real-world CI/CD pipelines.