๐Ÿ“˜ Basics

GitHub Actions: From First Workflow to Production CI/CD

Set up CI/CD in 30 minutes. From your first workflow to deploying on every push, with matrix builds, secrets, and reusable workflows.

๐Ÿ“… June 30, 2026 ๐Ÿ“Š Level: beginner ๐Ÿ“ฆ GitHub: actions

Sponsored

GitHub Actions: First Workflow to Production

GitHub Actions is the most-used CI/CD platform (700M+ workflow runs/month). Itโ€™s built into GitHub โ€” no setup server needed.

Your first workflow

Create .github/workflows/ci.yml:

name: CI
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - run: npm test

Thatโ€™s it. Push to GitHub โ†’ CI runs on every commit.

Common patterns

Matrix builds

strategy:
  matrix:
    node: [18, 20, 22]
    os: [ubuntu-latest, macos-latest, windows-latest]

Secrets

env:
  API_KEY: ${{ secrets.API_KEY }}

Caching

- uses: actions/cache@v4
  with:
    path: ~/.npm
    key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

Deploy on tag

on:
  push:
    tags: ['v*']
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm run build
      - run: vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }}

Reusable workflows

.github/workflows/deploy.yml:

on: workflow_call
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: ./deploy.sh

Other workflows can call this:

jobs:
  deploy:
    uses: ./.github/workflows/deploy.yml

Key takeaways

๐Ÿ“ฆ ๅผ€ๆบ้กน็›ฎ

ๆœฌๆ•™็จ‹ๅŸบไบŽๅผ€ๆบ้กน็›ฎ actions ๆ•ด็†ใ€‚

โญ View on GitHub โ†’

Sponsored

๐Ÿ› ๏ธ Related Tools & Resources

Mechanical Keyboards โ†’
For coding & writing tutorials
USB-C Hubs โ†’
Multi-monitor dev setup
Noise-Cancelling Headphones โ†’
Focus while learning
Laptop Stands โ†’
Ergonomics for long tutorials