GITHUB / LESSON 08
GitHub Actions Basics.
Automating your workflow

Loading the lesson…
Loading activities…
GITHUB / LESSON 08
Automating your workflow

Loading the lesson…
Loading activities…
Imagine if every time you pushed code, something automatically checked it for errors, ran your tests and even published your website. That's GitHub Actions. It automates the boring stuff so you don't have to do it by hand.
GitHub Actions is a tool built right into GitHub that runs tasks automatically when certain things happen. Those automated tasks are called "workflows."
Here's the kind of stuff people automate.
I learned the "humans forget" lesson the hard way. I once had a client's forms break over a weekend, and nobody knew until Monday when dozens of them were already dead. Nothing was checking. An automated check that yells the moment something breaks is worth its weight in gold (and a whole lot cheaper than finding out from an angry client).
GitHub Actions runs on a simple trigger-and-action setup.
Trigger - "When this happens..."
Action - "...do this"
A workflow is a set of instructions that tells GitHub Actions what to do. Workflows live in your repository in a special folder.
The .yml file holds the instructions in a format called YAML (officially "YAML Ain't Markup Language," because developers can't resist a nerdy joke). Don't sweat it, you don't have to write these yourself. Claude Code can make them for you!
Here's what a basic workflow looks like.
Let's break it down.
| Part | What It Means |
|---|---|
name: Run Tests | What to call this workflow |
on: push | Run when code is pushed |
branches: [main] | Only for the main branch |
runs-on: ubuntu-latest | Use a Linux computer |
actions/checkout@v7 | Download the code |
actions/setup-node@v7 | Install Node.js (version 24 here) |
run: npm ci | Install your project's packages from the lockfile |
run: npm test | Run the test command |
When a workflow runs, you can watch it happen on GitHub.
Open your repository on GitHub.
You'll find the "Actions" tab along the top of the page.
Every time a workflow runs, it shows up here. Click one to see the details.
Green checkmark means success. Red X means something failed. Click it to see what happened.
This is the BIG one. Every time you push code, here's what happens.
If tests fail, you'll see a red X on your Pull Request, warning you before you merge broken code.
For websites and apps it goes like this.
No manual deploying needed!
You can automatically check for things like these.
These checks can run on every single Pull Request.
When you open a Pull Request, GitHub Actions runs your workflows and shows you the results.
Lots of teams require every check to pass before anyone's allowed to merge.
You don't have to build workflows by hand. Here are a couple easy ways to add them.
Just tell Claude Code what you want to automate.
Claude Code will make the workflow file for you!
.github/workflows/ as YAML filesYou've learned a TON about Git and GitHub! In the last lesson of this module, we'll see how Claude Code makes all of this even easier by handling the Git work for you...