-
Notifications
You must be signed in to change notification settings - Fork 295
Add documentation for one-click deployments #2614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis PR introduces a one-click deployment feature for Appwrite Functions and Sites. It includes: (1) a new GET route handler that serves deployment button SVGs with light/dark variants and caching headers, (2) two new documentation pages detailing the one-click deployment process for Functions and Sites respectively, including deployment parameters, supported runtimes/presets, and deployment URL construction guidance, and (3) navigation updates to both Functions and Sites documentation layouts linking to the new deployment pages. Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (5)
src/routes/docs/products/functions/one-click-deployment/+page.markdoc (2)
7-7: Improve clarity of the introduction.Consider rephrasing for better readability and clarity.
Apply this diff:
-Appwrite allows you to make your function available to deploy with one click for other users. This is useful if your function is a template or an open-source project. Using one-click deployment link will ensure your function is easy to setup and deploy for other users, with you providing all the necessary information and configuration. +Appwrite allows you to make your function available for one-click deployment by other users. This is useful if your function is a template or an open-source project. Using a one-click deployment link ensures your function is easy to set up and deploy for other users, with you providing all the necessary information and configuration.
124-124: Remove trailing blank line.Minor formatting cleanup.
Apply this diff:
-src/routes/deploy/+server.ts (1)
8-8: Consider using SvelteKit's static asset handling instead of file system access.Using
process.cwd()and file system operations can be unreliable in certain deployment environments (serverless, edge functions). SvelteKit typically serves static assets directly from thestaticfolder without requiring runtime file system access.Consider one of these approaches:
- Serve the SVGs directly from
/images/deploy/light.svgand/images/deploy/dark.svgwithout this route- If dynamic serving is required, use SvelteKit's
$app/pathsor consider importing the SVGs as modulesIf file system access is necessary, verify this works correctly in your deployment environment.
src/routes/docs/products/sites/one-click-deployment/+page.markdoc (2)
7-7: Improve clarity of the introduction.Consider rephrasing for better readability and clarity, consistent with the Functions documentation.
Apply this diff:
-Appwrite allows you to make your site available to deploy with one click for other users. This is useful if your site is a template or an open-source project. Using one-click deployment link will ensure your site is easy to setup and deploy for other users, with you providing all the necessary information and configuration. +Appwrite allows you to make your site available for one-click deployment by other users. This is useful if your site is a template or an open-source project. Using a one-click deployment link ensures your site is easy to set up and deploy for other users, with you providing all the necessary information and configuration.
124-124: Remove trailing blank line.Minor formatting cleanup.
Apply this diff:
-
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
static/images/deploy/dark.svgis excluded by!**/*.svgstatic/images/deploy/light.svgis excluded by!**/*.svg
📒 Files selected for processing (5)
src/routes/deploy/+server.ts(1 hunks)src/routes/docs/products/functions/+layout.svelte(1 hunks)src/routes/docs/products/functions/one-click-deployment/+page.markdoc(1 hunks)src/routes/docs/products/sites/+layout.svelte(1 hunks)src/routes/docs/products/sites/one-click-deployment/+page.markdoc(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-05T14:29:00.422Z
Learnt from: ItzNotABug
Repo: appwrite/website PR: 2362
File: src/routes/(marketing)/(components)/features.svelte:9-13
Timestamp: 2025-09-05T14:29:00.422Z
Learning: In the Appwrite website repository, fragment links (URLs with #anchor) in documentation are handled internally by the system and don't require explicit markdoc anchors or HTML id attributes in the source files.
Applied to files:
src/routes/docs/products/functions/one-click-deployment/+page.markdoc
🔇 Additional comments (6)
src/routes/docs/products/functions/+layout.svelte (1)
76-79: LGTM!The navigation entry is correctly structured and appropriately placed in the Journeys section.
src/routes/docs/products/sites/+layout.svelte (1)
80-83: LGTM!The navigation entry is correctly structured and appropriately placed in the Journeys section, consistent with the Functions navigation.
src/routes/deploy/+server.ts (2)
16-16: Verify the aggressive caching strategy aligns with update requirements.The caching header
max-age=31536000, immutablesets a 1-year cache that tells browsers the asset will never change. This is appropriate for versioned assets but could cause issues if you need to update the SVG files in the future.Consider whether:
- These SVG files will remain static indefinitely
- You have a versioning strategy if updates are needed
- A shorter cache duration might be more appropriate
1-27: Verify that the SVG files exist in the expected location.Ensure the files
static/images/deploy/light.svgandstatic/images/deploy/dark.svgexist and are included in the PR or repository.Run the following script to verify the SVG files exist:
src/routes/docs/products/sites/one-click-deployment/+page.markdoc (2)
46-49: Clarify the conditional visibility logic for name and tagline parameters.The statement "Only shown when
screenshotis present" for bothnameandtaglineparameters suggests UI behavior that may be confusing. Please verify whether:
- These parameters are ignored when
screenshotis absent- They function but aren't displayed in some UI component
- This is the intended behavior
Consider adding clarification about what "only shown" means in this context.
72-72: Verify the default framework preset behavior.The documentation states "By default, Appwrite will consider the framework of your repository to be Next.js." Please confirm:
- Is Next.js always the default, or does Appwrite attempt to auto-detect the framework?
- Is Next.js the most appropriate default choice for the majority of users?
If auto-detection is available, consider updating the documentation to reflect this capability.
| @@ -0,0 +1,123 @@ | |||
| --- | |||
| layout: article | |||
| title: One-Click Deployment | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use sentence case, not title case
| title: One-Click Deployment | |
| title: One-click deployment |
Same goes for sites
| You may use the deploy button wherever you want to display a button to deploy your function with Appwrite. The button is hosted on the following URL: | ||
|
|
||
| ```text | ||
| https://appwrite.io/deploy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd confirm with Eldad if it's okay to use this path
We may want to use this in the future for something else
| @@ -0,0 +1,123 @@ | |||
| --- | |||
| layout: article | |||
| title: One-Click Deployment | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| title: One-Click Deployment | |
| title: One-Click deployment |
| href: '/docs/products/functions/execute' | ||
| }, | ||
| { | ||
| label: 'One-Click Deployment', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| label: 'One-Click Deployment', | |
| label: 'One-Click deployment', |
| You may construct the deploy URL by using the following URL: | ||
|
|
||
| ```text | ||
| https://cloud.appwrite.io/console/sites/deploy?repo=[GITHUB_REPO_URL] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing region
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should work without it
| href: '/docs/products/sites/deploy-manually' | ||
| }, | ||
| { | ||
| label: 'One-Click Deployment', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. Any reason we're not using sentence case for the title?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason, I'll change that!
Summary by CodeRabbit