Add endpoint for triggering site deployment (#563)

* feat(api): Add endpoint for triggering site deployment

- Add POST /api/projects/{project}/servers/{server}/sites/{site}/deploy endpoint
- Add feature tests

* fix merge issue and generate api docs

* fix merge

---------

Co-authored-by: Saeed Vaziry <61919774+saeedvaziry@users.noreply.github.com>
Co-authored-by: Saeed Vaziry <mr.saeedvaziry@gmail.com>
This commit is contained in:
Dimitar Yanakiev
2025-04-05 20:41:52 +03:00
committed by GitHub
parent f483f7fdca
commit 2a670146d8
33 changed files with 1941 additions and 1450 deletions

View File

@ -60,7 +60,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer d8Ev3Pce54gkZ6h6faVb1Da'
- 'Bearer veV66fcbdaaEhZg3k5P148D'
controller: null
method: null
route: null
@ -113,7 +113,7 @@ endpoints:
name: type
description: ''
required: true
example: phpmyadmin
example: wordpress
type: string
enumValues:
- php
@ -129,7 +129,7 @@ endpoints:
name: domain
description: ''
required: true
example: tenetur
example: ut
type: string
enumValues: []
exampleWasSpecified: false
@ -140,7 +140,7 @@ endpoints:
description: ''
required: true
example:
- aut
- vitae
type: 'string[]'
enumValues: []
exampleWasSpecified: false
@ -170,7 +170,7 @@ endpoints:
name: source_control
description: 'Source control ID, Required for Sites which support source control'
required: true
example: quasi
example: animi
type: string
enumValues: []
exampleWasSpecified: false
@ -220,7 +220,7 @@ endpoints:
name: user
description: 'user, to isolate the website under a new user'
required: true
example: deleniti
example: est
type: string
enumValues: []
exampleWasSpecified: false
@ -230,7 +230,7 @@ endpoints:
name: method
description: 'Load balancer method, Required if the site type is Load balancer'
required: true
example: round-robin
example: least-connections
type: string
enumValues:
- round-robin
@ -240,19 +240,19 @@ endpoints:
nullable: false
custom: []
cleanBodyParameters:
type: phpmyadmin
domain: tenetur
type: wordpress
domain: ut
aliases:
- aut
- vitae
php_version: '7.4'
web_directory: public
source_control: quasi
source_control: animi
repository: organization/repository
branch: main
composer: true
version: 5.2.1
user: deleniti
method: round-robin
user: est
method: least-connections
fileParameters: []
responses:
-
@ -265,7 +265,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer ge6VPfkE8cah6Dv34bda15Z'
- 'Bearer b1a8cEahVek364vPfD6gdZ5'
controller: null
method: null
route: null
@ -312,7 +312,7 @@ endpoints:
name: id
description: 'The ID of the site.'
required: true
example: 12
example: 44
type: integer
enumValues: []
exampleWasSpecified: false
@ -321,7 +321,7 @@ endpoints:
cleanUrlParameters:
project_id: 1
server_id: 29
id: 12
id: 44
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
@ -338,7 +338,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer a14kPe3b6fvd6ZgahEVc58D'
- 'Bearer dvh6k4EaV16a3Zefb5c8DPg'
controller: null
method: null
route: null
@ -385,7 +385,7 @@ endpoints:
name: site_id
description: 'The ID of the site.'
required: true
example: 9
example: 44
type: integer
enumValues: []
exampleWasSpecified: false
@ -394,7 +394,7 @@ endpoints:
cleanUrlParameters:
project_id: 1
server_id: 29
site_id: 9
site_id: 44
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
@ -411,7 +411,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer cvfD853h4EZae6dab6gVPk1'
- 'Bearer ZVP56aavDg3f8ek1c4E6hdb'
controller: null
method: null
route: null
@ -458,7 +458,7 @@ endpoints:
name: site_id
description: 'The ID of the site.'
required: true
example: 19
example: 44
type: integer
enumValues: []
exampleWasSpecified: false
@ -467,7 +467,7 @@ endpoints:
cleanUrlParameters:
project_id: 1
server_id: 29
site_id: 19
site_id: 44
queryParameters: []
cleanQueryParameters: []
bodyParameters:
@ -475,7 +475,7 @@ endpoints:
name: method
description: 'Load balancer method, Required if the site type is Load balancer'
required: true
example: ip-hash
example: round-robin
type: string
enumValues:
- round-robin
@ -489,16 +489,16 @@ endpoints:
description: 'Array of servers including server, port, weight, backup. (server is the local IP of the server)'
required: true
example:
- dolores
- eaque
type: 'string[]'
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
method: ip-hash
method: round-robin
servers:
- dolores
- eaque
fileParameters: []
responses:
-
@ -511,7 +511,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer de5Vka1avb6Zg36fDE8Ph4c'
- 'Bearer ekaVDdgZh1ca58vE34b6P6f'
controller: null
method: null
route: null
@ -558,7 +558,7 @@ endpoints:
name: site_id
description: 'The ID of the site.'
required: true
example: 16
example: 44
type: integer
enumValues: []
exampleWasSpecified: false
@ -567,7 +567,7 @@ endpoints:
cleanUrlParameters:
project_id: 1
server_id: 29
site_id: 16
site_id: 44
queryParameters: []
cleanQueryParameters: []
bodyParameters:
@ -576,7 +576,7 @@ endpoints:
description: 'Array of aliases'
required: true
example:
- aut
- pariatur
type: 'string[]'
enumValues: []
exampleWasSpecified: false
@ -584,7 +584,7 @@ endpoints:
custom: []
cleanBodyParameters:
aliases:
- aut
- pariatur
fileParameters: []
responses:
-
@ -597,7 +597,80 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer 6f6kVD153hEgPdZacva4b8e'
- 'Bearer 8gaaebDd641ck6V5vP3fZhE'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/projects/{project_id}/servers/{server_id}/sites/{site_id}/deploy'
metadata:
groupName: sites
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: deploy
description: 'Run site deployment script'
authenticated: true
custom: []
headers:
Authorization: 'Bearer YOUR-API-KEY'
Content-Type: application/json
Accept: application/json
urlParameters:
project_id:
name: project_id
description: 'The ID of the project.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
server_id:
name: server_id
description: 'The ID of the server.'
required: true
example: 29
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
site_id:
name: site_id
description: 'The ID of the site.'
required: true
example: 44
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
project_id: 1
server_id: 29
site_id: 44
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 200
content: null
headers: []
description: ''
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer ka634ZEfbgdevD56c1aVP8h'
controller: null
method: null
route: null
@ -644,7 +717,7 @@ endpoints:
name: site_id
description: 'The ID of the site.'
required: true
example: 3
example: 44
type: integer
enumValues: []
exampleWasSpecified: false
@ -653,7 +726,7 @@ endpoints:
cleanUrlParameters:
project_id: 1
server_id: 29
site_id: 3
site_id: 44
queryParameters: []
cleanQueryParameters: []
bodyParameters:
@ -661,14 +734,14 @@ endpoints:
name: script
description: 'Content of the deployment script'
required: true
example: qui
example: culpa
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
script: qui
script: culpa
fileParameters: []
responses:
-
@ -681,7 +754,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer 3b6Eh5eaf1d48DZvPgk6cVa'
- 'Bearer 68a6cfD4e1g3dvPVkbEaZh5'
controller: null
method: null
route: null
@ -728,7 +801,7 @@ endpoints:
name: site_id
description: 'The ID of the site.'
required: true
example: 16
example: 44
type: integer
enumValues: []
exampleWasSpecified: false
@ -737,7 +810,7 @@ endpoints:
cleanUrlParameters:
project_id: 1
server_id: 29
site_id: 16
site_id: 44
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
@ -754,7 +827,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer v1kEa3hgb664dfD5Z8VePac'
- 'Bearer 568gb3fdca1PDek4vZEVa6h'
controller: null
method: null
route: null