Deployment
GitHub Actions
CI/CD workflows with GitHub Actions for automated testing, building, and deployment.
CodePilot uses GitHub Actions for continuous integration and deployment. Workflows are defined in .github/workflows/.
CI Workflow
The primary CI workflow runs on every push and pull request:
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm --filter @repo/db run db:generate
- run: pnpm typecheck
build:
runs-on: ubuntu-latest
needs: [lint, typecheck]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm --filter @repo/db run db:generate
- run: pnpm buildPipeline Stages
Type Check
Runs TypeScript compiler in noEmit mode to validate types across the monorepo.
pnpm typecheckCaching
The workflow uses pnpm's cache to speed up dependency installation:
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"This caches the pnpm store between runs, significantly reducing CI time.
Branch Protection
We recommend configuring GitHub branch protection rules for main:
- Require status checks to pass (lint, typecheck, build)
- Require pull request reviews
- Require branches to be up to date before merging