Actions181
- Account Actions
- Get Account
- Create Account
- Update Email
- Update Name
- Update Password
- Update Phone
- Update Status
- Get Preferences
- Update Preferences
- List Sessions
- Delete Sessions
- Get Session
- Update Session
- Delete Session
- Create Anonymous Session
- Create Email/Password Session
- Create Magic URL Session
- Create OAuth2 Session
- Create Phone Session
- Create Session from Token
- Create JWT
- Create Magic URL
- Create Phone Token
- Create Email Verification
- Update Email Verification
- Create Phone Verification
- Update Phone Verification
- Create Password Recovery
- Update Password Recovery
- Create Recovery
- Update Recovery
- Update MFA
- Create MFA Authenticator
- Update MFA Authenticator
- Delete MFA Authenticator
- Create MFA Challenge
- Update MFA Challenge
- Attribute Actions
- Avatars Actions
- Collection Actions
- Database Actions
- Document Actions
- Functions Actions
- Index Actions
- Locale Actions
- Messaging Actions
- Sites Actions
- Storage Actions
- Teams Actions
- Users Actions
Sites → Create Deployment
AI-generatedOverview
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
- Deploy a static website by uploading a gzipped archive of the site code.
- Deploy a site directly from a Git repository by specifying the branch and optional commit hash.
- 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
- Appwrite Sites API - Create Deployment - Official documentation for creating deployments in Appwrite Sites API.