Analysis updated 2026-05-18
Give every pull request its own live Cloudflare preview URL for reviewers to test.
Automatically apply database migrations to a fresh D1 instance per pull request.
Sync existing development data into each preview instead of starting from empty.
| bitbybit-b3/cf-pr-preview-action | 0xkinno/astraea | 0xkinno/halcyon | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | moderate | hard | hard |
| Complexity | 3/5 | 4/5 | 4/5 |
| Audience | ops devops | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires a Cloudflare API token and account ID stored as GitHub Actions secrets.
cf-pr-preview-action is a GitHub Action that gives every pull request its own temporary, isolated preview environment on Cloudflare. When a pull request is opened, the action creates a dedicated Cloudflare Worker along with its own D1 database, KV store, and R2 bucket just for that PR, deploys the code to it, runs any database migrations, and posts a comment on the pull request with a link to the live preview. When the pull request is closed, all of that infrastructure is torn down automatically, so nothing is left running. Setting it up means adding a step to a GitHub Actions workflow file that triggers on pull request events such as opened, updated, reopened, and closed. The example configuration installs dependencies with a tool called Bun, then calls this action with a couple of naming inputs for the preview Worker and database, along with a Cloudflare API token and account ID passed in as secrets. From there, opening a pull request produces a working preview at a workers.dev address, with a comment on the PR that updates as the preview changes and disappears when the PR closes. The action also supports syncing data from an existing development environment into each preview, so a preview does not have to start from an empty database. Full documentation, including token permission scopes, the complete list of configuration inputs and outputs, and the data syncing guide, lives on a separate documentation site linked from the README rather than in the README itself. For anyone contributing to the action itself, the project is written in TypeScript, uses Bun for installing packages, type checking, and testing, and builds down to a single committed file that GitHub Actions actually runs, with continuous integration checking that this built file stays in sync with the source. The project is released under the MIT license, a permissive license that allows free use, modification, and distribution as long as the copyright notice is kept.
A GitHub Action that spins up an isolated Cloudflare Worker, D1 database, KV store, and R2 bucket for each pull request, then tears them down when the PR closes.
Mainly TypeScript. The stack also includes TypeScript, Bun, Cloudflare Workers.
MIT license: free to use, modify, and distribute, as long as the copyright notice is kept.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly ops devops.
This repo across BitVibe Labs
Verify against the repo before relying on details.