Skip to content

Commit ba0db9d

Browse files
committed
updates based on feedback
1 parent 302d8aa commit ba0db9d

File tree

2 files changed

+9
-25
lines changed

2 files changed

+9
-25
lines changed

src/content/docs/workers/community/index.mdx

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/content/docs/workers/community/deploy-buttons.mdx renamed to src/content/docs/workers/platform/deploy-buttons.mdx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: Set up a Deploy to Cloudflare button
99

1010
import { Tabs, TabItem } from "@astrojs/starlight/components";
1111

12-
If you're building a Workers application and would like to share it with other developers, you can embed a Deploy to Cloudflare button in your README, blog post, or documentation to enable others to quickly bootstrap your application on their own Cloudflare account. Deploy to Cloudflare buttons eliminate the need for complex setup, allowing developers to get started with your public GitHub or GitLab repository in just a few clicks.
12+
If you're building a Workers application and would like to share it with other developers, you can embed a Deploy to Cloudflare button in your README, blog post, or documentation to enable others to quickly deploy your application on their own Cloudflare account. Deploy to Cloudflare buttons eliminate the need for complex setup, allowing developers to get started with your public GitHub or GitLab repository in just a few clicks.
1313

1414
[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/templates/tree/staging/saas-admin-template)
1515

@@ -34,14 +34,14 @@ Deploy to Cloudflare buttons can be embedded anywhere developers might want to l
3434
</TabItem>
3535
<TabItem label="HTML">
3636
```html
37-
<a href="https://deploy.workers.cloudflare.com/?url=<your git repo URL>"><img src="https://deploy.workers.cloudflare.com/button" alt="Deploy to Cloudflare"/></a>
37+
<a href="https://deploy.workers.cloudflare.com/?url=<YOUR_REPO_URL>"><img src="https://deploy.workers.cloudflare.com/button" alt="Deploy to Cloudflare"/></a>
3838
```
3939

4040
</TabItem>
4141

4242
<TabItem label="URL">
4343
```
44-
https://deploy.workers.cloudflare.com/?url=<your git repo link>
44+
https://deploy.workers.cloudflare.com/?url=<YOUR_REPO_URL>
4545
```
4646
</TabItem>
4747
</Tabs>
@@ -54,16 +54,14 @@ Once you have your snippet, you can paste this wherever you would like your butt
5454

5555
## Automatic Resource provisioning
5656
If your Worker application requires Cloudflare resources, they will be automatically provisioned as part of the deployment. Currently, supported resources include:
57-
* **Storage**: KV namespaces, D1 databases, R2 buckets, Hyperdrive, and Vectorize databases
58-
* **Compute**: Durable Objects, Workers AI, Containers, and Queues
57+
* **Storage**: [KV namespaces](/kv/), [D1 databases](/d1/), [R2 buckets](/r2/), [Hyperdrive](/hyperdrive/), and [Vectorize databases](/vectorize/)
58+
* **Compute**: [Durable Objects](/durable-objects/), [Workers AI](/workers-ai/), and [Queues](/queues/)
5959

6060
Cloudflare will read the Wrangler configuration file of your source repo to determine resource requirements for your application. During deployment, Cloudflare will provision any necessary resources and update the Wrangler configuration where applicable for newly created resources (e.g. database IDs and namespace IDs). To ensure successful deployment, please make sure your source repository includes default values for resource names, resource IDs and any other properties for each binding.
6161

6262
## Best practices
6363
**Configuring Build/Deploy commands**: If you are using custom `build` and `deploy` scripts in your package.json (for example, if using a full stack framework or running D1 migrations), Cloudfare will automatically detect and pre-populate the build and deploy fields. Users can choose to modify or accept the custom commands during deployment configuration.
6464

65-
<insert screenshot of build and deploy command UI/>
66-
6765
If no `deploy` script is specified, Cloudflare will preconfigure `npx wrangler deploy` by default. If no `build` script is specified, Cloudflare will leave this field blank.
6866

6967
**Running D1 Migrations**: If you would like to run migrations as part of your setup, you can specify this in your `package.json` by running your migrations as part of your `deploy` script. The migration command should reference the binding name rather than the database name to ensure migrations are successful when users specify a database name that is different from that of your source repository. The following is an example of how you can set up the scripts section of your `package.json`:
@@ -81,8 +79,8 @@ If no `deploy` script is specified, Cloudflare will preconfigure `npx wrangler d
8179
## Limitations
8280

8381
* **Monorepos**: Cloudflare does not fully support monorepos
84-
* Unless your application is completely isolated within a subdirectory and has no dependencies outside of that subdirectory (for example, [a monorepo of example applications](https://github.com/cloudflare/templates)), the build will fail.
85-
* Additionally, if your monorepo contains multiple Workers applications, they will not be deployed together. You must configure a separate Deploy to Cloudflare button for each application. The user will manually create a distinct Workers application for each subdirectory.
86-
* **Pages applications**: Currently, Deploy to Cloudflare buttons only support Workers applications today.
82+
* If your repository URL contains a subdirectory, your application must be fully isolated within that subdirectory, including any dependencies. Otherwise, the build will fail. Cloudflare treats this subdirectory as the root of the new repository created as part of the deploy process.
83+
* Additionally, if you have a monorepo that contains multiple Workers applications, they will not be deployed together. You must configure a separate Deploy to Cloudflare button for each application. The user will manually create a distinct Workers application for each subdirectory.
84+
* **Pages applications**: Deploy to Cloudflare buttons only support Workers applications.
8785
* **Non-GitHub/GitLab repositories**: Source repositories from anything other than github.com and gitlab.com are not supported. Self-hosted versions of GitHub and GitLab are also not supported.
88-
* **Private repositories**: Repositories must be public in order for others to successfully use your Deploy to Cloudflare button.
86+
* **Private repositories**: Repositories must be public in order for others to successfully use your Deploy to Cloudflare button.

0 commit comments

Comments
 (0)