Skip to content

Commit 4753cb0

Browse files
Apply suggestions from code review
Co-authored-by: ToriLindsay <[email protected]>
1 parent f893ce7 commit 4753cb0

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

src/content/docs/workers/deploy-buttons.mdx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Deploy to Cloudflare Button
2+
title: Deploy to Cloudflare button
33
pcx_content_type: concept
44
sidebar:
55
order: 5
@@ -8,12 +8,12 @@ description: Set Up a Deploy to Cloudflare Button
88
---
99
import { Tabs, TabItem } from "~/components"
1010

11-
# Using a Deploy to Cloudflare Button
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.
11+
# Using a Deploy to Cloudflare button
12+
If you are 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.
1313

1414
<insert deploy button here that links to example/>
1515

16-
## What are Deploy to Cloudflare Buttons?
16+
## What are Deploy to Cloudflare buttons?
1717
Deploy to Cloudflare buttons simplify the deployment of a Workers application by enabling Cloudflare to:
1818
* **Clone a Git repository**: Cloudflare clones your source repository into the user's GitHub/GitLab account where they can continue development after deploying.
1919
* **Configure a project**: Your users can customize key details such as repository name, Worker name, and required resource names in a single setup page with customizations reflected in the newly created Git repository.
@@ -46,21 +46,21 @@ If you have already deployed your application using Workers Builds, you can gene
4646

4747
Once you have your snippet, you can paste this wherever you would like your button to be displayed.
4848

49-
## Automatic Resource Provisioning
49+
## Automatic resource provisioning
5050
If your Worker application requires Cloudflare resources, they will be automatically provisioned as part of the deployment. Currently, supported resources include:
51-
* **Storage**: KV namespaces, D1 databases, R2 buckets, Hyperdrive and Vectorize
52-
* **Compute**: Durable Objects, Workers AI, Containers and Queues
51+
* **Storage**: KV namespaces, D1 databases, R2 buckets, Hyperdrive, and Vectorize
52+
* **Compute**: Durable Objects, Workers AI, Containers, and Queues
5353

54-
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 (for example, database IDs, 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.
54+
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 (for example, 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.
5555

56-
## Best Practices
57-
**Configuring Build/Deploy commands**: If you are using custom `build` and `deploy` scripts in your package.json (e.g. 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.
56+
## Best practices
57+
**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.
5858

5959
<insert screenshot of build and deploy command UI/>
6060

6161
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.
6262

63-
** Running D1 Migrations**: If you would like to run migrations as part of your set up, 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`:
63+
**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`:
6464

6565
```json
6666
{
@@ -74,6 +74,6 @@ If no `deploy` script is specified, Cloudflare will preconfigure `npx wrangler d
7474

7575
## Not currently supported
7676
* **Monorepos**: Cloudflare does not fully support monorepos 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)). If your application relies on dependencies outside its subdirectory, the build will fail. 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.
77-
* **Pages applications**: Deploy to Cloudflare buttons only support Workers applications today.
78-
* **Non gitHub.com/gitLab.com 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.
77+
* **Pages applications**: Currently, Deploy to Cloudflare buttons only support Workers applications.
78+
* **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.
7979
* **Private repositories**: Repositories must be public in order for others to successfully use your Deploy to Cloudflare button.

src/content/docs/workers/get-started/dashboard.mdx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@ Follow this guide to create a Workers application using [the Cloudflare dashboar
2222

2323
To get started with a new Workers application:
2424

25-
1. Click [Create](https://dash.cloudflare.com/?to=/:account/workers-and-pages/create) in the Workers & Pages section of the dashboard
26-
2. You can select from the gallery of existing templates or choose to connect to GitHub or GitLab, import an existing repository on your own account or let Cloudflare clone and bootstrap a public repository containing a Workers application.
27-
3. Once you've connected to your chosen Git provider, configure your project and click `Deploy`.
28-
4. Cloudflare will kick off a build and deployment. Once deployed, preview your Worker at its provided `workers.dev` subdomain.
25+
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
26+
2. Go to **Workers & Pages**.
27+
3. Select **[Create](https://dash.cloudflare.com/?to=/:account/workers-and-pages/create)** and then:
28+
* Select from the gallery of existing templates.
29+
* Create a new, blank Worker by selecting **Hello world**.
30+
* [Import an existing GitHub or GitLab repository](/workers/ci-cd/builds/git-integration/index), by selecting **Git account** under **Import a repository**.
31+
* Let Cloudflare clone and bootstrap a public repository containing a Workers application.
32+
4. Review the provided code and select `Deploy`.
33+
34+
Cloudflare will kick off a build and deployment. Once deployed, you can preview your Worker at its provided `workers.dev` subdomain.
2935

3036
## Development
3137
Applications started in the dashboard are set up with Git to help kickstart your development workflow. To continue developing on your repository, you can run:

0 commit comments

Comments
 (0)