You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/workers/deploy-buttons.mdx
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Deploy to Cloudflare Button
2
+
title: Deploy to Cloudflare button
3
3
pcx_content_type: concept
4
4
sidebar:
5
5
order: 5
@@ -8,12 +8,12 @@ description: Set Up a Deploy to Cloudflare Button
8
8
---
9
9
import { Tabs, TabItem } from"~/components"
10
10
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.
13
13
14
14
<insertdeploybuttonherethatlinkstoexample/>
15
15
16
-
## What are Deploy to Cloudflare Buttons?
16
+
## What are Deploy to Cloudflare buttons?
17
17
Deploy to Cloudflare buttons simplify the deployment of a Workers application by enabling Cloudflare to:
18
18
***Clone a Git repository**: Cloudflare clones your source repository into the user's GitHub/GitLab account where they can continue development after deploying.
19
19
***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
46
46
47
47
Once you have your snippet, you can paste this wherever you would like your button to be displayed.
48
48
49
-
## Automatic Resource Provisioning
49
+
## Automatic resource provisioning
50
50
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
53
53
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.
55
55
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.
58
58
59
59
<insertscreenshotofbuildanddeploycommandUI/>
60
60
61
61
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.
62
62
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`:
64
64
65
65
```json
66
66
{
@@ -74,6 +74,6 @@ If no `deploy` script is specified, Cloudflare will preconfigure `npx wrangler d
74
74
75
75
## Not currently supported
76
76
***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.
79
79
***Private repositories**: Repositories must be public in order for others to successfully use your Deploy to Cloudflare button.
Copy file name to clipboardExpand all lines: src/content/docs/workers/get-started/dashboard.mdx
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,10 +22,16 @@ Follow this guide to create a Workers application using [the Cloudflare dashboar
22
22
23
23
To get started with a new Workers application:
24
24
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.
29
35
30
36
## Development
31
37
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