Laravel Forge JavaScript SDK

Deployment

Deployment

Enable quick deployment

Method

forge.deployment.enable(server_id, site_id)

Usage

1const forge = new Forge('API_TOKEN');
2
3await forge.deployment.enable(server_id, site_id);

Disable quick deployment

Method

forge.deployment.disable(server_id, site_id)

Usage

1const forge = new Forge('API_TOKEN');
2
3await forge.deployment.disable(server_id, site_id);

Get deployment script

Method

forge.deployment.getScript(server_id, site_id)

Usage

1const forge = new Forge('API_TOKEN');
2
3const script = await forge.deployment.getScript(server_id, site_id);

The response is a string for this request.


Update deployment script

Method

forge.deployment.updateScript(server_id, site_id, payload)

Usage

1const forge = new Forge('API_TOKEN');
2
3await forge.deployment.updateScript(server_id, site_id, payload);

Payload

1{
2 content: 'CONTENT_OF_THE_SCRIPT';
3}

Deploy now

Method

forge.deployment.deploy(server_id, site_id)

Usage

1const forge = new Forge('API_TOKEN');
2
3await forge.deployment.deploy(server_id, site_id);

Reset deployment status

Method

forge.deployment.reset(server_id, site_id)

Usage

1const forge = new Forge('API_TOKEN');
2
3await forge.deployment.reset(server_id, site_id);

Get deployment log

Method

forge.deployment.log(server_id, site_id)

Usage

1const forge = new Forge('API_TOKEN');
2
3const deploymentLog = await forge.deployment.log(server_id, site_id);

Example Response

The response is a string for this request.


Edit this page on GitHub