Ploi API
Ploi API

Custom deployment

Enable custom deployments in your site

POST api/servers/{server}/sites/{site}/repository/custom-deployments

Parameters

Parameter Type Status Description
script string optional A bash script to run optionally on initial instalation

Example request:

curl -X POST "https://ploi.io/api/servers/{server}/sites/{site}/repository/custom-deployments" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
   --data '{"script": "git clone https://github.com/laravel/laravel.git"}' \

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": 1,
        "domain": "domain.com",
        "web_directory": "/public",
        "wordpress": false,
        "laravel": false,
        "project_root": "/",
        "last_deploy_at": "2023-09-14 20:36:05",
        "created_at": "2023-09-14 11:40:01",
        "repository": {
            "branch": "",
            "user": "",
            "provider": "none"
        }
    }
}