GitHub Actions Tutorial for Beginners: Your First CI/CD Pipeline

Logan Jul 13, 2026

Embarking on your journey into automating your workflow with GitHub Actions? You're in the right place. Let's dive into a comprehensive, beginner-friendly tutorial that will help you understand and set up your first automation workflow.

GitHub Actions Tutorial - Basic Concepts and CI/CD Pipeline with Docker
GitHub Actions Tutorial - Basic Concepts and CI/CD Pipeline with Docker

GitHub Actions enables you to automate away a lot of the tedious and repetitive tasks that come with developing software. From running tests, to building and deploying applications, it's a powerful tool that saves time and reduces human error. But where do you start?

Beginner’s Guide to Getting Started with GitHub in 2025 – Easy Step-by-Step Tutorial
Beginner’s Guide to Getting Started with GitHub in 2025 – Easy Step-by-Step Tutorial

Understanding GitHub Actions

Before we dive into setting up our first workflow, let's gain a basic understanding of GitHub Actions. In essence, GitHub Actions lets you create automated workflows using simple, reusable triggers and actions.

GitHub Complete Beginner Guide (2026) | Learn Git & GitHub Step-by-Step
GitHub Complete Beginner Guide (2026) | Learn Git & GitHub Step-by-Step

At its core, a workflow is a series of jobs, where each job contains a series of steps. These steps are the actions that make up your workflow, which can range from running a script to creating a release on GitHub.

Workflow File

Git & GitHub Crash Course For Beginners
Git & GitHub Crash Course For Beginners

A workflow is defined in a special file inside your repository, called a workflow file. These files are plain YAML and must be placed in the .github/workflows/ directory of your repository.

Here's a simple example of what a workflow file might look like: ```yaml name: Hello World on: push: branches: - main jobs: say-hello: runs-on: ubuntu-latest steps: - name: Run a one-line script run: echo Hello, World! ```

In this example, the workflow is triggered on every push to the main branch. It runs a simple script that prints "Hello, World!"

Triggers

LetsDevOps: GitHub Actions Tutorial for Beginner's
LetsDevOps: GitHub Actions Tutorial for Beginner's

Triggers are how you tell GitHub Actions when to run your workflow. They can be based on a schedule, an event like a push or pull request, or even the state of a GitHub issue.

One of the most common triggers is 'on.push', which triggers the workflow on every push to your repository. You can also specify branches, paths, or other refinements to narrow down when the workflow should run.

Setting Up Your First Workflow

GitHub for Beginners πŸ§‘β€πŸ’» What You Must Know (2026 Guide)
GitHub for Beginners πŸ§‘β€πŸ’» What You Must Know (2026 Guide)

Now that we have a basic understanding, let's set up your first workflow. For this example, we'll create a workflow that greets the world each time we push to our repository.

To do this, we'll need to create a new file in the .github/workflows/ directory of our repository. Let's call it say-hello.yml. Inside this file, we'll paste the following code:

Nikki Siapno on LinkedIn: GitHub Actions β€” How do you optimize their performance? GitHub Actions is…
Nikki Siapno on LinkedIn: GitHub Actions β€” How do you optimize their performance? GitHub Actions is…
How GitHub Actions 10x my productivity
How GitHub Actions 10x my productivity
Git & GitHub Cheat Sheet πŸ”₯ | Commands, Workflow, Branching & Version Control (Beginner to Pro)
Git & GitHub Cheat Sheet πŸ”₯ | Commands, Workflow, Branching & Version Control (Beginner to Pro)
Git & GitHub Roadmap for Beginners
Git & GitHub Roadmap for Beginners
Level Up Your Portfolio with These Beginner-Friendly GitHub Projects
Level Up Your Portfolio with These Beginner-Friendly GitHub Projects
Git & GitHub Explained for Beginners (2026)
Git & GitHub Explained for Beginners (2026)
Git & GitHub Cheat Sheet for Beginners
Git & GitHub Cheat Sheet for Beginners
Git & GitHub Commands Cheat Sheet πŸ’» | Essential Developer Guide
Git & GitHub Commands Cheat Sheet πŸ’» | Essential Developer Guide
the github copilot commands chart
the github copilot commands chart
Git & GitHub Basics for Beginners
Git & GitHub Basics for Beginners
How to Clone a Repository Using GitHub Desktop
How to Clone a Repository Using GitHub Desktop
What is Git? (Day 1 Beginner Guide)
What is Git? (Day 1 Beginner Guide)
Git Workflow
Git Workflow
A Beginners Guide to CI/CD with GitHub Actions
A Beginners Guide to CI/CD with GitHub Actions
The Ultimate Git Commands Cheat Sheet for Developers πŸš€πŸ’» #git #command #code
The Ultimate Git Commands Cheat Sheet for Developers πŸš€πŸ’» #git #command #code
Git Basics Every Developer Must Know (Beginner Guide)
Git Basics Every Developer Must Know (Beginner Guide)
Your First Open Source Contribution: A Beginner's GitHub Guide πŸŒ±πŸ’»
Your First Open Source Contribution: A Beginner's GitHub Guide πŸŒ±πŸ’»
An Intro to Git and GitHub for Beginners (Tutorial)
An Intro to Git and GitHub for Beginners (Tutorial)
Git Cheat Sheet πŸ”₯ | Essential Git Commands Every Developer Should Know
Git Cheat Sheet πŸ”₯ | Essential Git Commands Every Developer Should Know
Git Tutorial for Beginners - Git & GitHub Fundamentals In Depth
Git Tutorial for Beginners - Git & GitHub Fundamentals In Depth

Creating the Workflow File

Here's our simple workflow file: ```yaml name: Say Hello on: push: branches: - main jobs: say-hello: runs-on: ubuntu-latest steps: - name: Run a one-line script run: echo Hello, World! ```

Our workflow is named 'Say Hello', and it's triggered on every push to the main branch. The 'say-hello' job runs on the latest version of Ubuntu, and its single step is to run the 'echo' command to print "Hello, World!".

Commit and Push

Once you've saved this file, you'll need to commit and push it to your repository. This will trigger your new workflow. If you go to the 'Actions' tab on your repository's homepage, you should see your new workflow running.

Click on the workflow, and on the next screen, you'll see the progress of the job executing. If all goes well, you should see "Hello, World!" printed out.

Expanding Your Workflows

Now that you've got the basics down, there's a world of possibilities to explore. You can add more steps to your workflows, create new jobs, or even use pre-built actions created by others in the GitHub community.

For example, you could add a step to your 'say-hello' workflow that displays the list of files that have changed in your push. Or you could create a completely new workflow that runs your tests whenever a pull request is opened.

Exploring Marketplace Actions

The GitHub Marketplace has a wide range of pre-built actions that you can use in your workflows. From running tests and building applications to deploying to various platforms, there's a lot you can do with just a few lines of YAML.

To use a Marketplace action, you simply need to include it as a step in your workflow. You can find the action's documentation on their Marketplace page, which will tell you how to use it.

Running Workflows Locally and Debugging

Sometimes, you might want to test your workflows locally before you push them to GitHub. GitHub Actions includes a command-line interface (CLI) that lets you do exactly that.

The CLI allows you to run your workflows on your local machine, which can be helpful for debugging or testing changes before you push them. It's a powerful tool that can save you a lot of time and frustration.

And there you have it! You've just taken your first steps into the world of GitHub Actions. Keep exploring, keep automating, and most importantly, keep learning. There's a whole world of automation waiting for you.