Backend Development
Step 20 / 2090 min

CI/CD & Deployment

Shipping Backend

Explanation

GitHub Actions can lint, test, and deploy your API on every push to main.

Code example

yaml
name: API CI
on:
  push:
    branches: [main]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - run: npm ci
      - run: npm test

Helpful resources

Exercise

Add a GitHub Actions workflow that installs dependencies and runs tests on main.