1. Workflow name
name labels the workflow as it appears in the Actions tab.
name: CITyporithm · medium
Step 1 of 8 · intro card
CI/CD
A GitHub Actions workflow is a YAML file in .github/workflows. on declares the events that trigger it, jobs lists units of work, each job names a runner with runs-on, and steps either use a published action or run a shell command.
A workflow lives in .github/workflows as a YAML file. The on key declares the events that trigger it — here a push to the main branch (pull_request is the other common trigger).
Inside jobs, each named job picks a runner with runs-on (ubuntu-latest is a fresh Linux VM). A workflow can have many jobs, which run in parallel by default.
A job is a sequence of steps. A step either uses a published action (uses: actions/checkout@v4 pulls your code) or runs a shell command (run: npm ci && npm test). Checkout, install, and test are the typical first steps.
Workflow YAML lives in .github/workflows.
on declares the triggering events (push, pull_request).
jobs run on a runner; steps use an action or run a command.
name: CI
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm testConnect each part of the code to the concept before you type.
name labels the workflow as it appears in the Actions tab.
name: CIon declares which events start the workflow — here a push to main.
on:
push:
branches: [main]jobs holds named units of work; build is one job.
jobs:
build:runs-on picks the virtual machine (runner) the job executes on.
runs-on: ubuntu-latestuses runs a published action; checkout pulls your repo onto the runner.
- uses: actions/checkout@v4run executes a shell command — install dependencies then run tests.
- run: npm ci && npm testRead the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.