OnePloy can deploy automatically in three ways: through a GitHub or GitLab App (configured for you), through a manual Git webhook from your Git provider, or by calling the deploy webhook URL from any CI pipeline with an API token. All three are shown on the application’s Webhooks page.
How do I deploy from a CI pipeline?
Use the Deploy webhook URL on the application’s Webhooks page. It has this shape:
https://app.oneploy.dev/api/v1/deploy?uuid=APP_UUID&force=false
Send a POST request to it with an API token that has the deploy permission. A GET request returns 405 with a message asking for POST.
curl -fsS -X POST -H "Authorization: Bearer $API_TOKEN" \
"https://app.oneploy.dev/api/v1/deploy?uuid=APP_UUID&force=false"
Create the token under Keys & Tokens, then API tokens. See API authentication.
Deploy endpoint parameters
| Parameter | Meaning |
|---|---|
uuid | One resource UUID, or several separated by commas. |
tag | One tag name, or several separated by commas. Deploys every resource with that tag. |
force | true rebuilds without the build cache. |
pr | Pull request ID, to deploy a specific preview. Cannot be combined with tag. |
Example: GitHub Actions
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Trigger OnePloy deployment
run: |
curl -fsS -X POST -H "Authorization: Bearer ${{ secrets.DEPLOY_TOKEN }}" \
"https://app.oneploy.dev/api/v1/deploy?uuid=${{ secrets.APP_UUID }}&force=false"
How do I set up a manual Git webhook?
Manual webhooks are needed only when the repository is not connected through a GitHub App or GitLab App, for example a public repository or one deployed with a deploy key.
- Open the application’s Webhooks page.
- Under Manual Git webhooks, copy the webhook URL for your provider and set a webhook secret.
- In your Git provider, add a webhook for push events with that URL and the same secret.
| Provider | Webhook path |
|---|---|
| GitHub | /webhooks/source/github/events/manual |
| GitLab | /webhooks/source/gitlab/events/manual |
| Bitbucket | /webhooks/source/bitbucket/events/manual |
| Gitea | /webhooks/source/gitea/events/manual |
The GitHub endpoint accepts JSON or form-encoded payloads.
How do I stop automatic deployments?
Turn off Auto deploy in the application’s advanced settings. Pushes will no longer deploy, but you can still deploy manually or through the deploy webhook.
Can I cancel a deployment from CI?
Yes. POST /api/v1/deployments/{uuid}/cancel cancels a queued or running deployment, and GET /api/v1/deployments/{uuid} returns its details and status.