Deployments
Triggering a Deployment
Automatic: Pushing to the configured branch on GitHub triggers a deployment automatically via webhook.
Manual: Click Deploy Now on the Project page at any time.
API: Use the DeployShip API with an API key to trigger deploys from your own scripts or CI pipelines:
curl -X POST https://api.deployship.io/projects/:id/deployments/trigger \
-H "Authorization: Bearer ds_live_your_api_key"
What Happens During a Deployment
- A deploy job is queued
- DeployShip connects to your server via SSH
- If the project directory doesn't exist, the repository is cloned
- Latest code is pulled (or the specific commit is checked out for rollbacks)
- Pre-deploy command runs (if configured — e.g. database migrations)
- Build command runs
- PM2 ecosystem file is written and the process is started or restarted
- Post-deploy command runs (if configured — e.g. cache clearing)
- DeployShip verifies the application is listening on its assigned port
- SSH connection closes
- Deploy status is updated to SUCCESS or FAILED
Deploy Logs
Every command's output is streamed in real time to the Logs tab on the project page. You do not need to refresh — logs appear as they happen.
Full log output is stored and accessible from the deployment history for the duration of your plan's log retention period.
Deployment Statuses
| Status | Meaning |
|---|---|
| QUEUED | Job is waiting to be picked up by the deploy worker |
| RUNNING | Actively deploying — SSH connected, commands executing |
| SUCCESS | All commands completed with exit code 0. Port binding verified. |
| FAILED | A command returned a non-zero exit code. See logs for details. |
| CANCELLED | Deployment was cancelled before completion |
| ROLLED_BACK | This deployment was superseded by a rollback |
Was this page helpful?