This is an alpha, sneak peek of Monorepo Maestros. For this iteration, I'm getting all of my thoughts down. In the future, we'll have better information architecture, graphics, and other awesomeness. Your feedback is welcome!

Deploy to Vercel

Vercel features built-in CI/CD that can build Turborepo applications with near-zero configuration. To show you how this works, we can deploy two applications to Vercel in under 5 minutes without ever leaving the command line!

Prerequisites

Create a new Turborepo

For demo purposes, let's use the Turborepo starter.

Terminal
npx create-turbo@latest
cd my-turborepo # or whatever name you used
Terminal
npx create-turbo@latest
cd my-turborepo # or whatever name you used

Create a repository on GitHub

In your new repository, make sure you have a remote to commit your code to.

Terminal
gh repo create --public --source=. --remote=origin
Terminal
gh repo create --public --source=. --remote=origin

Now that your local repository has a remote on GitHub, you can create projects on Vercel that are connected to your remote using Vercel CLI.

Terminal
vercel link --repo
Terminal
vercel link --repo

This command will create a new file at the root of your repository at .vercel/repo.json where you'll find a mapping of your applications to Vercel projects.

Ship!

You're ready to go! Time to ship your applications.

To ship your docs app:

Terminal
cd apps/docs
vercel
Terminal
cd apps/docs
vercel

To ship your web app:

Terminal
cd apps/web
vercel
Terminal
cd apps/web
vercel

You've now shipped two preview deployments from one monorepo. You could also choose to run vercel --prod to ship to production.

Vercel will use your Vercel Remote Cache with zero-configuration. Through workspace-level caching, you'll always be shipping as fast as possible.

Iterate!

To get your local machine hooked up to your Vercel Remote Cache, run two quick commands:

Terminal
npx turbo login
npx turbo link
Terminal
npx turbo login
npx turbo link

You'll now be sharing tasks across machines, never duplicating work across your local and CI machines.

As you continue building, you can push code to GitHub on branches and pull requests to create new preview deployments and ship code to production. You can also create one-off preview deployments using vercel in your terminal to ship your current changes to a Preview Deploy whenever you'd like.