GitHub Actions Quick Tutorial: Master CI/CD in Minutes

Logan Jul 13, 2026

Github Actions is a powerful tool for automating your software workflows directly within your GitHub repository. If you're new to GitHub Actions, this quick tutorial will guide you through creating, triggering, and monitoring your first automated workflow in no time.

How GitHub Actions 10x my productivity
How GitHub Actions 10x my productivity

Before we delve into the meat of the tutorial, ensure you have the following prerequisites: a GitHub account, a repository, and basic familiarity with Git and GitHub. Let's dive right in!

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…

Creating Your First Workflow File

A workflow file is a YAML file in your repository that defines the jobs and their steps. It resides in the .github/workflows directory. Let's create your first workflow file.

A Beginners Guide to CI/CD with GitHub Actions
A Beginners Guide to CI/CD with GitHub Actions

1. In your repository, create a new directory named '.github/workflows'. If the '.github' directory doesn't exist, create that first.

Project Setup

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

First, let's create a simple project to demonstrate GitHub Actions. In your repository, create an empty file named 'hello-world.js'.

2. Add the following line to 'hello-world.js' and push it to your repository:

```javascript console.log("Hello, world!"); ```

Creating the Workflow File

An Intro to Git and GitHub for Beginners (Tutorial)
An Intro to Git and GitHub for Beginners (Tutorial)

3. Now, create a new file in the '.github/workflows' directory, naming it 'hello-world.yml'.

4. Add the following content to 'hello-world.yml' and push it to your repository:

```yaml name: Hello, World! on: push: branches: [ main ] jobs: say-hello: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Say hello run: node hello-world.js ```

The 'say-hello' job will run on any push to the 'main' branch. It will checkout your code, and then run the 'node hello-world.js' command, which will print "Hello, world!"

Your First Open Source Contribution: A Beginner's GitHub Guide 🌱💻
Your First Open Source Contribution: A Beginner's GitHub Guide 🌱💻

Triggering Your First Workflow

Now that you've created your first workflow, let's trigger it!

Complete Beginner’s Guide to Git and GitHub for 2025
Complete Beginner’s Guide to Git and GitHub for 2025
Git & GitHub Commands Cheat Sheet 💻 | Essential Developer Guide
Git & GitHub Commands Cheat Sheet 💻 | Essential Developer Guide
Git Vs Github
Git Vs Github
Beginner's Guide to GIT | GitHub
Beginner's Guide to GIT | GitHub
the git diagram shows how to use it
the git diagram shows how to use it
Git Workflow
Git Workflow
a laptop computer sitting on top of a desk next to a cup of coffee and pen
a laptop computer sitting on top of a desk next to a cup of coffee and pen
a computer screen with the text stop forgeting git
a computer screen with the text stop forgeting git
Git & GitHub Cheat Sheet for Beginners (Version Control Basics)
Git & GitHub Cheat Sheet for Beginners (Version Control Basics)
Git commands Cheat Sheet
Git commands Cheat Sheet
Git
Git
Git Commands Practice Guide
Git Commands Practice Guide
Top 15 Git Commands Cheatsheet
Top 15 Git Commands Cheatsheet
the git cheatshet is shown in this screenshote, which shows how to
the git cheatshet is shown in this screenshote, which shows how to
Quick Tip: Git Commands Every Dev Should Know
Quick Tip: Git Commands Every Dev Should Know
#CSS Animations Tips and Tricks
#CSS Animations Tips and Tricks
Introduction to Git & Version Control | Beginner's Guide
Introduction to Git & Version Control | Beginner's Guide
Pranav Jadhav👨🏼‍💻 on LinkedIn: #html #css #javascript #webdevelopment #programming #github #git | 21 comments
Pranav Jadhav👨🏼‍💻 on LinkedIn: #html #css #javascript #webdevelopment #programming #github #git | 21 comments
Git Commands Every Beginner Developer Should Know (Save This Cheat Sheet)
Git Commands Every Beginner Developer Should Know (Save This Cheat Sheet)
an image of different types of cats
an image of different types of cats

Making a Git Commit

1. Make a new commit in your local repository to trigger the GitHub Actions workflow.

2. Push your commit to the 'main' branch of your repository.

Monitoring the Workflow Run

Next, let's see how the workflow run progresses in real-time.

3. In your repository, click on the "Actions" tab. You'll see a list of your workflows. Find the "Hello, World!" one and click on it.

4. Click on the latest workflow run. You'll see the progress of each job step in real-time. Once completed, you'll see the output from 'node hello-world.js': "Hello, world!"

Modifying and Running Workflows

Let's make our workflow a bit more dynamic. We'll introduce environment variables and a loop.

Environment Variables

1. Add the following lines to your 'hello-world.yml' workflow file:

```yaml env: MESSAGE: "Goodbye, world!" ... steps: - uses: actions/checkout@v2 - name: Say hello run: echo "$MESSAGE" ```

Now, modify your 'hello-world.js' file to use this variable:

```javascript const message = process.env.MESSAGE || "Hello, world!"; console.log(message); ```

Running a For Loop

2. Let's run the 'echo' command in a loop five times, each time with a different message:

```yaml name: Hello, World! on: push: branches: [ main ] env: MESSAGES: "Hello, world!\nHow are you?\nWhat's up?\nNot much.\nHow about you?" COUNT: 5 jobs: say-hello: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Say hello run: | for i in `seq 1 $COUNT` do echo "${!MESSAGES$i}" done ```

Now, push these changes to the 'main' branch and watch your workflow run. You'll see five outputs, one for each iteration of the loop.

And there you have it! You've created, triggered, and modified your first GitHub Actions workflow. Happy automating!