Cloudflare 中文文档
Workers
Workers
编辑这个页面
跳转官方原文档
Set theme to dark (⇧+D)

Deploy button

Last reviewed:

Deploy buttons let you deploy applications to Cloudflare’s global network in under five minutes. The deploy buttons use Wrangler to deploy a Worker using the Wrangler GitHub Action. You can deploy an application from a set of ready-made Cloudflare templates, or make deploy buttons for your own applications to make sharing your work easier.

Try the deploy button below to deploy a GraphQL server:

Select Deploy with Workers to deploy a GraphQL server

Refer to deploy.workers.cloudflare.com for additional projects to deploy.

​​ Create a deploy button for your project

  1. Add a GitHub Actions workflow to your project.

Add a new file to .github/workflows, such as .github/workflows/deploy.yml, and create a GitHub workflow for deploying your project. It should include a set of on events, including at least repository_dispatch, but probably push and maybe schedule as well. Add a step for publishing your project using wrangler-action:

  1. Add the Markdown code for your button to your project’s README, replacing the example url parameter with your repository URL.
  1. With your button configured, anyone can use the Deploy with Workers button in your repository README, and deploy their own copy of your application to Cloudflare’s global network.