What is GitHub Actions?
GitHub Actions lets you automate tasks when something happens in your repository — a push, a pull request, a release, and more.
You describe those tasks in a workflow YAML file. GitHub runs them for you.
What Can It Automate?
- Install dependencies
- Run tests
- Build the application
- Deploy to a server
All without repeating the same shell commands by hand.
Why Use GitHub Actions?
| Benefit | Why it matters |
|---|---|
| Automation | No manual npm i / npm run test on every change |
| Consistency | Same steps, same order, every time |
| Speed | Developers spend less time on repetitive ops |
| CI/CD | Natural place to encode CI checks and CD deploy |
Minimal Example
name: CI/CD Example
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: npm i
- run: npm run test
- run: npm run startThis is intentionally simple. Real workflows also check out the repo, pin Node versions, and deploy with a self-hosted runner — covered in the next lessons.
GitHub Actions automates your development workflow from testing through deployment.