Github Actions

How to use Turborepo with Github Actions


1. Add the secret to your Github repository

Go to https://github.com/<ORG>/<REPO>/settings/secrets/actions and create a new secret called TURBO_TOKEN with the value of your API token.

2. Add the env variables to your Github Actions workflow

name: CI
 
env:
  # Turborepo
  TURBO_API: "https://cache.turbocache.build"
  TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
  TURBO_TEAM: "any_name_ci"
  TURBO_RUN_SUMMARY: true
 
jobs:
  ...
  build:
    ...
    steps:
      - uses: turbocache-build/turbocache-action@v1 # <-- Add this line as the first step

Replace "any_name_ci" with your actual team name, this can be any name you want.