GitHub Actions is GitHub’s built-in CI/CD platform, letting you automate tasks like testing, building, and deploying code directly from your repository.
Released shortly before Microsoft’s 2018 acquisition of GitHub, it has become one of the most widely used automation tools for developers because workflows live right alongside your code — no separate CI/CD server required.
This guide walks you through the fundamentals: creating a GitHub repository, connecting it to your local Git setup, and writing your first GitHub Actions workflow file. By the end, you’ll have a working “Hello, World!” automation running in your own repo.
Introduction: What is GitHub (and GitHub Actions?)
GitHub is one of the most popular services on the planet for storing documents. That includes everything from PowerPoint presentations to recipes, but it’s the de facto standard for storing source code. Microsoft purchased GitHub in 2018, and despite that, GitHub has not lost any appreciable popularity among developers.
One of the main benefits of GitHub is full integration with Git. Git repositories are local and single user, but once a git repo is pushed to GitHub, a team can now share the repository and work together.
Storing source code in an online repository like GitHub is the first step. Next, most organizations will want to automate deploying application code and even the infrastructure used to test or host the application. There are many automation products available (also called CI/CD tools for continuous integration and continuous deployment) such as Azure DevOps Pipelines, Jenkins, Octopus Deploy and many more.
Shortly before Microsoft acquired GitHub in late 2018, GitHub Actions was released. GitHub Actions is a powerful CI/CD platform that can be used to automate code integration and deployment.
Prerequisites
To follow along with this article series, make sure you have:
After installing git, be sure to configure your account. Fill in the correct information and run in command line
|
1 2 3 |
git config –global user.email "your_email.com” git config --global user.name "your_name" |
Which will looks similar to this:

Create a GitHub repository
Follow these steps to create a GitHub repo.
- On GitHub.com, log in and click the + icon.
- Select New Repository:

New GitHub repository.
- Type in a name for the repo (My example will use the name “
GitHubActionsExample”)
- Leave security at
Public
New GitHub repository settings.
Subscribe to the Simple Talk newsletter
Connect the online repository to a local repository
Follow these steps to pull the repository to the local computer:
- Create a folder for your projects
- Create a folder for this specific project
- Open a command line and navigate to the new folder
- In GitHub, copy the code provided to create a local repo
echo "# GitHubActionsExample" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/<your repo name>/GithubActionsExample.git
git push - u origin main
- Paste the code into the command line window (Note that you may be required to authenticate with GitHub)
Running the code to connect the repo.
GitHub Actions structure
Automating a deployment – or anything you wish to automate – is accomplished by Workflows in GitHub Actions. For those of you who love working in code, there is no user interface. Workflow files are yaml.
Creating a new GitHub Actions file is simple. Within the repository, create this folder structure:
|
1 |
.github/workflows |

Any yaml file located in the workflows folder is automatically a GitHub Actions Workflow.
Hello, world!
This article series will cover how to create these files, but of course, the first thing to learn when code is involved is printing a “Hello, world!” message.
Open VS Code and create a new file. Save it in the new .github\workflows folder with a yaml or yml extension. Code for this article can be found here. Add this code:
|
1 2 3 4 5 6 7 8 9 10 |
name: Hello, World # Controls when the workflow will run, in this case manually on: workflow_dispatch jobs: PrintHelloWorld: name: Print Hello, World! runs-on: ubuntu-latest steps: - run: echo "Hello, World!" |
This should result in the following output:

Note that white space is critical in yaml. VS Code can help with this, but I find not getting it right is the source of most of the errors I make with yaml.
Save the file. Push to the online repo by typing this into the cmd window, with the project directory base directory in focus:
|
1 2 3 |
git add . git commit -m"Add a new workflow file" git push |
You should get output similar to the following. (note, the first statement does not have any output.)

If all went well, you should see the workflow in GitHub Actions in the Actions tab. The names of any workflows are listed on the left.

To run the code, click Run workflow → Run workflow.
Within a few seconds, you should see the Workflow in progress:

If the run is successful, you’ll see the green checkmark icon.

Drill down into the run to see the message:

Conclusion
This article walked you through setting up and running your first GitHub Actions Workflow. One of the benefits of GitHub Actions is its simplicity. The Workflow file is simple yaml – well, until it gets complex!
Workflows must have a VM, called a runner, to run on. You can provide your own VMs or use one that is provided by GitHub. Click here to learn all about GitHub-hosted runners, and here to learn all about self-hosted runners.
Simple Talk is brought to you by Redgate Software
FAQs: GitHub Actions
1. What is GitHub Actions used for?
GitHub Actions is GitHub’s built-in CI/CD platform, used to automate tasks like testing, building, and deploying code whenever changes are pushed to a repository — removing the need for a separate automation tool.
2. Is GitHub Actions free to use?
Yes. GitHub Actions includes free minutes for public repositories and a monthly allowance for private repos on most plans, with usage-based pricing once you exceed that limit.
3. Where are GitHub Actions workflow files stored, and what format do they use?
Workflows are YAML files stored in a .github/workflows folder at the root of your repository. Any .yml or .yaml file placed there is automatically recognized as a workflow — just be careful with indentation, since YAML relies on whitespace to define structure.
4. What is a "runner" in GitHub Actions?
A runner is the virtual machine that executes a workflow’s jobs. You can use GitHub-hosted runners, which are managed for you, or set up your own self-hosted runner for custom environments.
5. How do I trigger a GitHub Actions workflow manually?
Add on: workflow_dispatch to your workflow’s YAML file. Once pushed to GitHub, you can trigger it from the Actions tab by selecting the workflow and clicking “Run workflow.”
This document contains proprietary information and is protected by copyright law.
Copyright © 2026 Red Gate Software Limited. All rights reserved

Load comments