GitHub Actions start when something happens in your repository.
These are called Triggers.
✨ Examples of triggers:
👨💻 push (code pushed to repo)
🔀 pull_request opened
⏳ schedule (run everyday at 8 PM)
🖱️ workflow_dispatch (manual run)
This is like hitting the “Start Button” 🎬 in your automation pipeline.
Inside .github/workflows/ you write a .yml file.
This file tells GitHub:
What should trigger the workflow
What jobs to run
What steps inside each job
Think of it like a recipe card 📜 telling GitHub what to cook.
A runner is a machine (Linux/Windows/macOS) that executes your tasks.
GitHub gives you free runners like:
🐧 Ubuntu
🪟 Windows
🍎 macOS
It’s like a robot worker 🤖 assigned to execute your workflow.
A workflow contains jobs, and each job has steps.
Commands (like npm install, python3 script.py)
Pre-built Actions (marketplace reusable components)
Custom actions you create
Think of it like:
Jobs = Tasks
Steps = Instructions
Actions = Ready-made mini-tools 🧰
GitHub provides thousands of plug-and-play actions like:
🚀 Deploy to AWS
🔧 Lint your code
📦 Build Docker images
🧪 Run unit tests
🔔 Send notifications
You don’t need to write everything from scratch — just plug and use.
When the workflow executes, GitHub shows:
🟢 Success
🔴 Failure
🟡 In-progress
You can also see logs, artifacts, and debugging info.
| Stage | Meaning | Emoji |
|---|---|---|
| 🔵 Trigger | Something happened (push, PR, manual, schedule) | 🎬 |
| 🟣 Workflow | The recipe (.yml file) |
📜 |
| 🟡 Runner | Machine executing your tasks | 🤖 |
| 🟢 Jobs & Steps | Actual commands & actions | 🧩 |
| 🔴 Marketplace | Reusable tools | 🧰 |
| 🟠 Output | Success or failure | 🚦 |
name: 🚀 Deploy App
on:
push:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Dependencies
run: npm install
- name: Run Tests
run: npm test
- name: Deploy
uses: some/deploy-action@v1