DEV Community

Cover image for Deploy with workers
sudo-self
sudo-self

Posted on • Edited on

Deploy with workers

Button Generator

The Button Generator is a tool designed to streamline the deployment process for projects hosted on GitHub. By creating a "Deploy to Cloudflare Workers" button, you can simplify the deployment process, allowing users to deploy your application to Cloudflare Workers with a single click.

This button provides a convenient way for users to deploy your project directly to Cloudflare Workers, which is ideal for projects that benefit from serverless architecture and global distribution.

How It Works

By embedding a simple script tag into your webpage, you can integrate the deploy button functionality. This script will dynamically add a floating button to your webpage. When users click this button, it opens a popup that facilitates one-click deployments to Cloudflare Workers. This integration is especially useful for streamlining the deployment process for your users and enhancing their experience.

To include the deploy button generator on your webpage, simply add the following script tag:

<script src="https://sudo-self.github.io/deploy-button/deploy-button.js"></script>
Enter fullscreen mode Exit fullscreen mode

Example Widget

Deploy widget embed

How to Create Your Deploy Button

Get your GitHub repository URL

You need the GitHub repository URL in the format https://github.com/USERNAME/REPO

  • USERNAME is your GitHub username.
  • REPO is the name of your repository.

Construct the deploy button URL

https://deploy.workers.cloudflare.com/?url=https://github.com/USERNAME/REPO
Enter fullscreen mode Exit fullscreen mode

Replace USERNAME and REPO with your actual GitHub username and repository name. This URL links directly to Cloudflare's Workers deployment system, enabling seamless deployment of your project with a single click.

Image description

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay