CI/CD
GitHub Actions pipeline for the frontend
CI/CD Pipeline
The frontend includes a GitHub Actions pipeline that runs on every push to main and on pull requests.
Pipeline Overview
Push / PR
│
▼
┌─────────┐ ┌────────────┐ ┌──────────┐
│ Test │ ──▶ │ Build Prod │ ──▶ │ Deploy │
└─────────┘ └────────────┘ └──────────┘
Stage 1: Test
- Builds the dev Docker image
- Runs
npm audit(moderate severity level) - Runs
vitesttests
Triggered on both pull requests and pushes to main.
Stage 2: Build Production Image
Runs only after tests pass and only on pushes to main:
- Builds the production Docker image (multi-stage)
- Pushes to GitHub Container Registry (
ghcr.io/{owner}/{repo}:main) - Uses GitHub Actions cache for Docker layers
Stage 3: Deploy
Runs only after the build succeeds:
- Sends a POST request to the Dokploy webhook URL
- Dokploy pulls the new image and restarts the application
Required GitHub Secrets
| Secret | Description |
|---|---|
DOKPLOY_WEBHOOK_URL | Dokploy deployment webhook URL |
Docker Multi-Stage Build
The Dockerfile uses a multi-stage build:
Dev Stage
- Node 20 Alpine base
- Installs all dependencies (including devDependencies)
- Used for testing and development
Production Stage
- Node 20 Alpine base
- Installs only production dependencies
- Builds the Nuxt application
- Runs the server from
.output/server/index.mjs - Minimal image size for deployment