CI/CD & Automation
We utilize GitHub Actions to automate testing, building, and deployment processes.
Workflows
1. Unit Tests (unit-tests.yml)
- Trigger: On
pushto any branch. - Action: Runs
pnpm run test:unit. - Environment:
ubuntu-latestwith a MongoDB Service container. - Notifications: Sends success/failure alerts to Slack.
2. Integration Tests (integration-tests.yml)
- Trigger: On
pull_requesttomain. - Action: Runs
pnpm run test:integration. - Environment:
ubuntu-latestwith Mongo Service. - Security: Prevents unauthorized code execution from forks by using isolated runners for PRs.
3. Release Process (cut-release.yml)
- Trigger: Manual dispatch (Workflow Dispatch).
- Inputs:
version(e.g.,0.2.0). - Actions:
- Updates
package.jsonversion. - Extracts release notes from
CHANGELOG.md. - Creates a GitHub Release with the tag/notes.
- Builds the Docker Image (
Dockerfile). - Pushes image to GHCR (GitHub Container Registry).
- Updates
4. Deployment (deploy.yml)
- Trigger: Manual dispatch.
- Inputs:
environment(preprod|prod). - Action:
- SSH connects to the target self-hosted server.
- Pulls the latest Docker image from GHCR.
- Restarts the container with the selected environment's secrets (injected via Infisical).
- Performs a health check (
/health). - Rolls back or notifies Slack on failure.
5. Documentation (deploy-docs.yml)
- Trigger: On
pushtomain. - Action: Builds the MkDocs site and deploys it to GitHub Pages.