This guide explains how deployments work in Deploy Center from start to finish, including the queuing system, execution pipeline, and result handling.
- Overview
- Deployment Triggers
- Queue System
- Deployment Lifecycle
- Monitoring Deployments
- Troubleshooting
Deploy Center uses a sophisticated deployment workflow that ensures reliable, traceable, and conflict-free deployments. Every deployment goes through a structured pipeline from trigger to completion.
- Queue Management: Per-project queues prevent deployment conflicts
- Real-Time Updates: Live status via WebSocket connections
- Automated Recovery: Built-in rollback and error handling
- Detailed Logging: Step-by-step execution logs
- Multi-Path Support: Deploy to multiple locations simultaneously
There are two ways to trigger a deployment:
Triggered by a user through the UI or API.
When to use:
- Production deployments requiring approval
- Testing specific commits
- Off-hours deployments
- Emergency hotfixes
How it works:
- User clicks "Deploy" button in the project dashboard
- Selects branch and optional commit hash
- Adds deployment notes (optional)
- Deployment is created and queued
Permissions:
- Admin/Manager: Can deploy any project
- Developer: Can deploy assigned projects only
- Viewer: Cannot trigger deployments
Triggered automatically when code is pushed to the repository.
When to use:
- Continuous deployment workflows
- Development/staging environments
- Automated testing pipelines
How it works:
- Developer pushes code to GitHub
- GitHub sends webhook to Deploy Center
- Webhook is verified using HMAC-SHA256 signature
- Payload is processed and validated
- Deployment conditions are checked
- If all conditions pass, deployment is queued
Deployment Conditions:
- Branch must match project configuration
- Repository URL must match
- Auto-deploy must be enabled
- Optional: Specific file paths must be changed (if configured)
Deploy Center uses a per-project queue system to manage deployment execution.
- Prevents Conflicts: Only one deployment runs per project at a time
- Maintains Order: Deployments execute in the order they were triggered
- Resource Management: Prevents server overload
- Cancellation Support: Queue items can be cancelled before execution
┌─────────────┐
│ Trigger │ (Manual/Webhook)
└──────┬──────┘
│
▼
┌─────────────┐
│ Queued │ (Status: Queued)
└──────┬──────┘
│
▼
┌─────────────┐
│ Executing │ (Status: InProgress)
└──────┬──────┘
│
├──────────┐
▼ ▼
┌──────────┐ ┌──────┐
│ Success │ │Failed│
└──────────┘ └──────┘
- All deployments in a project queue have equal priority
- Execution order is FIFO (First In, First Out)
- Cancelling a queued deployment removes it from the queue
- Failed deployments don't block the queue
A deployment goes through several stages:
Duration: ~5-10 seconds
What happens:
- Working directory is created (
deployments/{projectId}/{deploymentId}) - Deployment status set to "InProgress"
- "Deployment Started" notification sent (if enabled)
- SSH key context prepared (for private repositories)
File Structure:
deployments/
└── {projectId}/
└── {deploymentId}/
└── {repositoryName}/ ← Working directory
Duration: Depends on repository size
What happens:
For First Deployment:
- Full Git clone of the repository
- Uses HTTPS or SSH based on configuration
- Checks out the specified branch
For Subsequent Deployments:
- Git pull to update existing repository
- Faster than cloning
- Preserves Git history
SSH Key Security:
- Private key decrypted from database
- Temporary key file created with strict permissions (0600)
- Key file deleted immediately after use
- Uses
GIT_SSH_COMMANDenvironment variable
Duration: Depends on pipeline steps
What happens:
- Each pipeline step executes sequentially
- Commands run in the working directory
- Step logs are captured in real-time
- Environment variables are injected
- Variables are replaced (e.g.,
$BRANCH,$COMMIT_HASH) - Conditional steps evaluated (using
runIfexpressions)
Common Tasks:
- Installing dependencies (
npm install,composer install) - Building application (
npm run build,mvn package) - Running tests (
npm test,pytest) - Compiling assets
Failure Handling:
- If any step fails (exit code ≠ 0), pipeline stops
- Deployment marked as failed
- Working directory cleaned up
- No files synced to production
Duration: Depends on file count and size
What happens:
Smart Sync Logic:
- Only changed files are copied (not full sync)
- Respects
Sync IgnorePatterns(like.gitignore) - Handles
BuildOutputPathif specified - Supports multiple deployment paths
- Preserves system files (
.env,.htaccess,web.config, etc.)
Sync Methods:
- Windows: PowerShell-based copy with progress
- Linux/Mac: rsync with custom options
Multi-Path Deployment: If multiple deployment paths are configured, files are synced to each path sequentially.
Example:
DeploymentPaths: [
"/var/www/production",
"/var/www/backup",
"/mnt/cdn/public"
]Duration: Depends on pipeline steps
What happens:
- Each step executes in the production directory
- Commands run sequentially
- Environment variables available
- Real-time logging
Common Tasks:
- Restarting services (
pm2 restart app,systemctl restart nginx) - Running migrations (
php artisan migrate,npm run migrate) - Clearing caches
- Warming up application
- Health checks
Rollback Support: If "Enable Automatic Rollback" is configured:
- Previous version backed up before sync
- If post-deployment fails, backup is restored
- Deployment marked as failed
Duration: < 1 second
What happens:
- Deployment metadata written to
.deploy-centerfiles - Deployment status updated (Success/Failed)
- Duration calculated
- Completion notification sent
- Working directory cleaned up
- SSH key context destroyed
- Next queued deployment starts (if any)
Metadata File (.deploy-center):
{
"deploymentId": 123,
"projectId": 45,
"deployedAt": "2026-01-04T11:30:00.000Z",
"branch": "main",
"commitHash": "abc123",
"triggeredBy": "webhook",
"duration": 180000
}Deploy Center provides live deployment monitoring via WebSocket:
Available in UI:
- Current deployment status
- Step-by-step progress
- Live command output
- Estimated completion time
- Queue position (for queued deployments)
Status Values:
Queued- Waiting in queueInProgress- Currently executingSuccess- Completed successfullyFailed- Failed during executionCancelled- Cancelled by user
Each deployment captures:
- Preparation Logs: Repository cloning/pulling
- Step Logs: Output from each pipeline step
- Sync Logs: File synchronization progress
- Error Logs: Failures and stack traces
- Timing Information: Duration for each phase
Log Retention:
- Logs stored in database (
DeploymentStepstable) - Available via API and UI
- No automatic cleanup (manual purge if needed)
Deployment notifications can be sent to:
Discord:
- Rich embeds with color-coded status
- Deployment details (branch, commit, author)
- Direct link to deployment logs
- Error messages (if failed)
Other Channels (Coming Soon):
- Slack
- Telegram
Symptoms: Deployment shows "Queued" but never starts
Causes:
- Another deployment is running for the same project
- Server service stopped/crashed
Solutions:
- Check if another deployment is running
- Cancel stuck deployment
- Restart Deploy Center service
Symptoms: "Failed to clone repository" error
Causes:
- Invalid repository URL
- Private repository without SSH key
- Network connectivity issues
- Invalid credentials
Solutions:
- Verify repository URL is correct
- For private repos, generate and add SSH key
- Check server network connectivity
- Test manual git clone on server
Symptoms: Pipeline fails during build step
Causes:
- Missing dependencies
- Incorrect build command
- Out of memory
- Environment variable missing
Solutions:
- Check step logs for specific error
- Verify build command is correct
- Ensure all dependencies are installed
- Check available server resources
- Verify environment variables
Symptoms: Files deployed but post-deployment step fails
Causes:
- Service restart requires sudo
- Command not found in PATH
- Application won't start
- Port already in use
Solutions:
- Check command permissions
- Use absolute paths for binaries
- Verify service configuration
- Check application logs
- Enable automatic rollback for safety
✅ Do:
- Test pipelines manually before deploying
- Use conditional steps for environment-specific tasks
- Enable notifications for production deployments
- Keep build steps fast and focused
- Use
npm ciinstead ofnpm installfor faster builds - Test rollback procedure in staging
❌ Don't:
- Run deployments as root user
- Use long-running commands in pipelines
- Deploy directly to production without testing
- Ignore failed deployments
- Skip testing webhook integration
- Store secrets in pipeline commands (use environment variables)
- Pipeline Configuration - Advanced pipeline setup
- SSH Key Management - Working with private repositories
- Webhook Setup - Configuring GitHub webhooks
- Notifications Setup - Configuring notification channels
Need Help? Join our Discord community or open an issue.