Learn Programming, Tech & Coding · Free Online Tools

IT Question Answer
Back to GitHub
GitHub Actions CI/CD Guide

GitHub Actions CI/CD Guide

GitHub1,338 viewsBy Admin
githubactionscicd

What is GitHub Actions?

GitHub Actions automates workflows — running tests, builds, and deployments automatically when you push code. It's GitHub's built-in CI/CD.

A Basic Workflow

# .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 install
      - run: npm test

Key Concepts

TermMeaning
WorkflowThe automation file
Trigger (on)What starts it
JobA set of steps
StepA single task
ActionReusable step

Auto-Deploy Example

on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm run build
      - run: npm run deploy

FAQs

Is GitHub Actions free?

Free minutes for public repos and a monthly allowance for private. More in our GitHub guides.

What is CI/CD?

Continuous Integration (auto-test) and Continuous Deployment (auto-release). See our DevOps guides.