A custom GitHub Action workflow to deploy your project to Vercel automatically when pushing to main.
Have you ever encountered this error?
- Error: Git author [userEmail] must have access to the team [teamName] on Vercel to create deployments.This workflow solves that issue by properly configuring automated Vercel deployments through GitHub Actions.
Create the following structure in your repository:
.github/
└── workflows/
└── vercel-deploy.yml
- Navigate to the Actions tab from your main repository page
- Click "Skip this and set up a workflow yourself"
- Paste the YML file contents from this repo (or add the file locally and commit to skip this step)
- Commit the changes
- Pull the changes to get the file locally
-
Navigate to the Settings tab from your main repository page
-
Click on "Secrets and variables" from the sidebar
-
Click on "Actions" from the subnav
-
Click "New repository secret"
-
Add the following three secrets:
VERCEL_TOKENVERCEL_ORG_IDVERCEL_PROJECT_ID
-
Click your user profile in the top right corner
-
Click "Account Settings"
-
Navigate to "Tokens" from the left sidebar
-
Click "Create" to generate your token
-
Copy and save the token - you won't be able to access it again after closing the modal
-
Navigate to vercel.com/account
-
Scroll down to find "Team" and copy the Team ID
-
Navigate to your Vercel dashboard
-
Click the ellipses button (...) on your desired project
-
Click "Settings"
-
Copy the Project ID
Your repository secrets should now look like this:
Commit and push to main! You should see:
Your Vercel deployments will now trigger automatically on every push to main.















