Update your deployment
Merge a new release into your copy of the repository, keep your settings, and deploy it.
Your server runs from your own copy of this repository, and that copy doesn’t follow upstream releases on its own. To get a release, merge it into your copy and deploy. Your bucket, database, and token stay where they are.
Coming from version 4? Read Upgrade from v4 first.
Before you merge
- Read the server changelog for the release you want. Look for configuration changes and stats database migrations.
- If the release migrates the stats database, back it up. Rolling back the code doesn’t roll back a migration. Artifacts need no backup, since
turborebuilds any it can’t find. - Note the files that hold your settings. You’ll keep your side of these when you merge:
apps/api/wrangler.jsonc: Worker name, bindings, resource IDs, routes, and variables.apps/api/nitro.config.ts: stats database and expiry schedule.apps/api/src/custom-adapter.ts: custom storage, if you use it..github/workflows/ci.ymland the rootturbo.json: your deployment and build cache.
Merge the release
In a checkout of your copy, add this repository as a remote and fetch its tags:
git remote add upstream https://github.com/AdiRishi/turborepo-remote-cache-cloudflare.git
git fetch upstream --tags
Server releases are tagged @turborepo-remote-cache/api@<version>. Merge the one you want, such as 5.3.0:
git merge @turborepo-remote-cache/api@5.3.0
Where the files above conflict, keep your names, IDs, and settings, and take everything else from upstream. Review those files even when Git reports no conflict.
If Git refuses with refusing to merge unrelated histories, your copy doesn’t share history with this repository. Fork the repository instead, check out the release, and copy your settings from the files above into it. Then point Workers Builds or your CI at the new repository. Future updates merge cleanly from there.
Deploy and check
-
Install dependencies and run the checks:
pnpm install --frozen-lockfile pnpm check -
Commit the merge and deploy it the way you deploy today. Push to your production branch for Workers Builds or GitHub Actions, or run
pnpm run deployfor a manual Cloudflare deploy. Other hosts follow their platform guide. -
Check that the server answers
/pingand/v8/artifacts/status, as in Check the deployment, and check that hits come from the server. -
Open the dashboard. If stats stopped, look for
[stats]errors in the logs.