Appwrite icon

Appwrite

Interact with Appwrite API

Actions181

Sites → Create Deployment

AI-generated

Overview

This node interacts with the Appwrite API to create a deployment for a specified site. It supports deploying code either by uploading a gzipped code archive or by specifying a Git repository with branch and commit options. Users can also configure deployment options such as whether to activate the deployment immediately, override install and build commands, and specify the output directory. This node is useful for automating site deployments in Appwrite environments, enabling continuous integration and delivery workflows.

Use Case Examples

  1. Deploy a static website by uploading a gzipped archive of the site code.
  2. Deploy a site directly from a Git repository by specifying the branch and optional commit hash.
  3. Automate deployment activation and customize build commands during deployment creation.

Properties

Name Meaning
Site ID The ID of the site to which the deployment will be created.
Deployment Source Method of deployment, either by uploading code or using a Git repository.
Code Archive Field Binary field containing the gzipped code archive to upload when using the upload deployment source.
Git Options Options for Git deployment including branch and specific commit hash.
Deployment Options Additional deployment settings such as activation, install command, build command, and output directory.

Output

JSON

  • deploymentId - The unique identifier of the created deployment.
  • siteId - The ID of the site for which the deployment was created.
  • status - The status of the deployment (e.g., pending, active).
  • createdAt - Timestamp when the deployment was created.
  • activated - Boolean indicating if the deployment was activated after creation.

Dependencies

  • Appwrite API endpoint
  • Project ID
  • API key credential for authentication

Troubleshooting

  • Ensure the Site ID is correct and the site exists in the Appwrite project.
  • Verify that the API key has sufficient permissions to create deployments.
  • If uploading code, confirm the binary field contains a valid gzipped archive.
  • For Git deployments, check that the branch and commit hash (if provided) exist in the repository.
  • Common errors include authentication failures, invalid site ID, or malformed deployment options. Verify credentials and input parameters to resolve these.

Links

Discussion