Add endpoint for reading & updating site deployment script (#562)

* feat(api): Add endpoint for updating site deployment script

- Add PUT /api/projects/{project}/servers/{server}/sites/{site}/deployment-script endpoint
- Add feature tests for successful and failed updates

* added reading deployment script as well

* generate docs

---------

Co-authored-by: Saeed Vaziry <mr.saeedvaziry@gmail.com>
This commit is contained in:
Dimitar Yanakiev
2025-03-29 22:49:28 +02:00
committed by GitHub
parent 03be2d3ee2
commit 7882d2022c
33 changed files with 4072 additions and 1701 deletions

View File

@ -41,7 +41,7 @@ endpoints:
responses:
-
status: 200
content: '{"data":[{"id":5,"project_id":null,"global":true,"name":"dolorem","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"},{"id":6,"project_id":null,"global":true,"name":"itaque","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
content: '{"data":[{"id":5,"project_id":null,"global":true,"name":"sit","provider":"ftp","created_at":"2025-03-29T20:43:56.000000Z","updated_at":"2025-03-29T20:43:56.000000Z"},{"id":6,"project_id":null,"global":true,"name":"repudiandae","provider":"local","created_at":"2025-03-29T20:43:56.000000Z","updated_at":"2025-03-29T20:43:56.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
@ -49,7 +49,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer D16Vg58E6Pfkh3Zveab4dca'
- 'Bearer EbkDP1Z3aVav8g6ef6dc5h4'
controller: null
method: null
route: null
@ -91,7 +91,7 @@ endpoints:
name: provider
description: 'The provider (aws, linode, hetzner, digitalocean, vultr, ...)'
required: true
example: alias
example: est
type: string
enumValues: []
exampleWasSpecified: false
@ -101,7 +101,7 @@ endpoints:
name: name
description: 'The name of the storage provider.'
required: true
example: explicabo
example: id
type: string
enumValues: []
exampleWasSpecified: false
@ -111,7 +111,7 @@ endpoints:
name: token
description: 'The token if provider requires api token'
required: true
example: ut
example: repellendus
type: string
enumValues: []
exampleWasSpecified: false
@ -121,7 +121,7 @@ endpoints:
name: key
description: 'The key if provider requires key'
required: true
example: libero
example: ducimus
type: string
enumValues: []
exampleWasSpecified: false
@ -131,23 +131,23 @@ endpoints:
name: secret
description: 'The secret if provider requires key'
required: true
example: consequatur
example: possimus
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
provider: alias
name: explicabo
token: ut
key: libero
secret: consequatur
provider: est
name: id
token: repellendus
key: ducimus
secret: possimus
fileParameters: []
responses:
-
status: 200
content: '{"id":5,"project_id":null,"global":true,"name":"quos","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
content: '{"id":5,"project_id":null,"global":true,"name":"sequi","provider":"dropbox","created_at":"2025-03-29T20:43:56.000000Z","updated_at":"2025-03-29T20:43:56.000000Z"}'
headers: []
description: ''
custom: []
@ -155,7 +155,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer DaZ6d6Eck1bhVe3g4aP85vf'
- 'Bearer 45kVPD6ec6hvga83bfa1dEZ'
controller: null
method: null
route: null
@ -209,7 +209,7 @@ endpoints:
responses:
-
status: 200
content: '{"id":5,"project_id":null,"global":true,"name":"id","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
content: '{"id":5,"project_id":null,"global":true,"name":"alias","provider":"ftp","created_at":"2025-03-29T20:43:56.000000Z","updated_at":"2025-03-29T20:43:56.000000Z"}'
headers: []
description: ''
custom: []
@ -217,7 +217,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer 1dekD4gva56bc683VPEhZfa'
- 'Bearer ahb6gDd8fv3P1ak6cEe4V5Z'
controller: null
method: null
route: null
@ -270,7 +270,7 @@ endpoints:
name: name
description: 'The name of the storage provider.'
required: true
example: sequi
example: ullam
type: string
enumValues: []
exampleWasSpecified: false
@ -280,7 +280,7 @@ endpoints:
name: global
description: 'Accessible in all projects'
required: true
example: false
example: true
type: string
enumValues:
- true
@ -289,13 +289,13 @@ endpoints:
nullable: false
custom: []
cleanBodyParameters:
name: sequi
global: false
name: ullam
global: true
fileParameters: []
responses:
-
status: 200
content: '{"id":5,"project_id":null,"global":true,"name":"velit","provider":"s3","created_at":"2025-01-30T22:42:49.000000Z","updated_at":"2025-01-30T22:42:49.000000Z"}'
content: '{"id":5,"project_id":null,"global":true,"name":"at","provider":"ftp","created_at":"2025-03-29T20:43:56.000000Z","updated_at":"2025-03-29T20:43:56.000000Z"}'
headers: []
description: ''
custom: []
@ -303,7 +303,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer V65g18Pca4v3hDEkbZfe6da'
- 'Bearer a8Vgfvh5abkd616eDZ43cPE'
controller: null
method: null
route: null
@ -365,7 +365,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer 1v6a6efgch3DbZ4aVE5d8kP'
- 'Bearer kDheaPEvb61Va564dZc8f3g'
controller: null
method: null
route: null