CI/CD
GitHub Actions pipeline for testing, building, and deploying
CI/CD Pipeline
The backend includes a GitHub Actions pipeline that runs on every push to main.
Pipeline Overview
Push to main
│
▼
┌─────────┐ ┌────────────┐ ┌──────────┐
│ Test │ ──▶ │ Build Prod │ ──▶ │ Deploy │
└─────────┘ └────────────┘ └──────────┘
Stage 1: Test
Builds the dev Docker image and runs the full quality suite:
- Validate and check
composer.json/composer.lock - Security audit for known vulnerabilities
- Install dependencies
- Set up test database (PostgreSQL + migrations)
- Generate JWT keys
- Run unit tests
- Run functional tests
- PHPStan static analysis
- PHP CS Fixer check (dry-run)
Stage 2: Build Production Image
Runs only if all tests pass. Builds the frankenphp_prod Docker target and pushes to GitHub Container Registry (ghcr.io).
Stage 3: Deploy
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 |
GITHUB_TOKENis automatically provided by GitHub Actions for pushing to GHCR.
Running Checks Locally
Before pushing, run the same checks the CI runs:
make test # Tests
make phpstan # Static analysis
make csfix # Code style (auto-fix)
If make csfix changes any files, commit them before pushing — the CI runs CS Fixer in dry-run mode.