CI/CD

CI/CD Pipeline Guide

Continuous integration and deployment pipeline configuration.

Overview

Gauzy uses GitHub Actions for CI/CD with the following stages:

Diagram; its source is available below
Diagram source
graph LR
    PR[Pull Request] --> CI[CI Build]
    CI --> Lint[Lint]
    CI --> Test[Test]
    CI --> Build[Build]
    Build --> Docker[Docker Build]
    Docker --> Deploy[Deploy]

CI Pipeline (Pull Requests)

Triggered on every PR:

name: CI
on:
  pull_request:
    branches: [develop, main]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v6
        with:
          node-version: 20
      - run: yarn install --frozen-lockfile
      - run: yarn lint
      - run: yarn test
      - run: yarn build

CD Pipeline (Main Branch)

Triggered on merge to main:

  1. Build Docker images
  2. Push to GHCR (ghcr.io/ever-co/gauzy-*)
  3. Deploy to staging/production

Docker Build Pipeline

- name: Build and push
  uses: docker/build-push-action@v5
  with:
    context: .
    push: true
    tags: ghcr.io/ever-co/gauzy-api:latest
    build-args: |
      VERDACCIO_TOKEN=${{ secrets.VERDACCIO_TOKEN }}

Deployment Environments

EnvironmentTriggerTarget
DevPush to developdev.example.com
StagingPush to mainstaging.example.com
ProductionManual releaseapp.example.com

Required Secrets

SecretDescription
GITHUB_TOKENAuto-provided by GH
VERDACCIO_TOKENPrivate registry token
DOCKER_HUB_USERNAMEContainer registry auth
SENTRY_DSNError tracking
DEPLOY_KEYSSH deploy key

Edit this page

Copyright © 2023-Present Ever Co. LTD.Docs by Sourcey