Skip to content
Home Tutorials Roadmaps Courses
Log in Join free
Tutorials Git GitHub Actions CI/CD
Git Beginner FREE

GitHub Actions CI/CD

Lesson 1 of 17 Beginner Interactive

GitHub Actions automate workflows — CI/CD, testing, deployment triggered by Git events.

Syntax

GIT
name: CI
on: [push]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm install
      - run: npm test
GitHub Actions CI
BASH
# .github/workflows/ci.yml
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

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