actions/cache for .turbo/cache, and you don’t need to set TURBO_API, TURBO_TOKEN, or TURBO_TEAM.
Before you start
- Install Turborepo in your repository.
- List each task’s outputs in
turbo.json. For example, a build that writesdistneeds"outputs": ["dist/**"]. Turborepo restores only the files you list, so a missing output can leave your build incomplete. - List the environment variables each task depends on in
turbo.json. Otherwise Turborepo can reuse a result built with different settings. See Turborepo caching.
Add Turbo to a workflow
Runturbo in your workflow as usual. For a project with a build task, save this workflow as .github/workflows/turbo-build.yml:
.github/workflows/turbo-build.yml
Switch from the old actions/cache recipe
If your workflow copies .turbo/cache with actions/cache, remove those restore, prune, and save steps. Also remove --cache=local:rw from your turbo command and any TURBO_CACHE=local:rw setting. That setting keeps Turborepo on the local cache, so it never uses Celesto’s saved results.
How the cache works
- Sharing: Branches and pull requests in the same repository share results. Pull requests from forks can use saved results but can’t add new ones.
- Your own remote cache: Celesto respects the
TURBO_API,TURBO_TOKEN, andTURBO_TEAMsettings you already have. If you pass--tokenon the command line, move it toTURBO_TOKEN. Otherwise Celesto can redirect the command and it can fail. - Storage: Turborepo results share the same storage limits and seven-day cleanup as your other caches.
- Containers: The cache covers
turbocommands that run directly on the runner. Don’t rely on it forturbocommands insidedocker buildor job containers.
