Laravel Forge JavaScript SDK
Deployment
Deployment
Enable quick deployment
Method
forge.deployment.enable(server_id, site_id)
Usage
1const forge = new Forge('API_TOKEN');23await 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');23await 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');23const 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');23await 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');23await 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');23await 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');23const deploymentLog = await forge.deployment.log(server_id, site_id);
Example Response
The response is a string for this request.
Edit this page on GitHub