Create a deploy button with GitHub Actions
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:
Refer to deploy.workers.cloudflare.com ↗ for additional projects to deploy.
Create a deploy button for your project
- 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 ↗:
- Add the Markdown code for your button to your project’s README, replacing the example
url
parameter with your repository URL.
- 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.