Hey guys, I am looking to deploy an app within my monorepo to Vercel via cli in Github Actions. I have Vercel projects setup for each app in the monorepo. I am following this documentation but am having issues with pulling the correct environment variables. When I run vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
it pulls env variables from $TEAM/$ROOT
, but my environment variables are located at $TEAM/$PROJECT
( PROJECT
correlating to the Vercel project name for that app).
I’ve also tried running a vercel link
in the prior step and specifying the current working directory with --cwd
when running but it says it can’t find a project at $TEAM/$PROJECT
even though that project does exist in Vercel.
Has anybody else deployed an app inside of their monorepo to Vercel via Github Actions?
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --debug --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --logs --token=${{ secrets.VERCEL_TOKEN }}