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

Mukul BhardwajMukul Bhardwaj
3 min read

๐Ÿ‘‹ 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:

  1. Workflows are YAML files: indentation matters โ€” a lot!

  2. You can run any Linux command inside run: | blocks

  3. Pre-built actions save time, like actions/checkout or docker/setup-buildx-action

  4. Logs are your friend โ€” every step has detailed logs

  5. 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!

1
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.