Free Tier CI/CD Collaboration Ends at Vercel What You Can Do

Vercel has cut off collaboration CI/CD for free tier users.Let dicuss the way around

User Avatar

Faisal Husain

Free Tier CI/CD Collaboration Ends at Vercel What You Can Do blog image

While collaborating on a project with my colleague, I encountered an unexpected issue: I could no longer deploy the code I had pushed to our shared repository on Vercel. Upon investigation, I realized that Vercel had updated their free tier policy, disabling CI/CD for projects involving multiple collaborators. This change required us to rethink our deployment strategy and explore alternative solutions to maintain our workflow without interruptions.

While finding solution I came accross this stackoverflow issue under which user have given solutions

Exploring Solutions

  • Upgrade to Vercel Pro ($20/month) (πŸ€‘πŸ’΅)
    If you're looking for the simplest solution, upgrading to Vercel's Pro plan will instantly re-enable CI/CD for collaborative projects. However, if you're like me and prefer a free solution, let's explore another option.
  • Set Up a GitHub Actions Workflow A more cost-effective solution is to configure a GitHub Actions workflow to handle deployments. You can set up a workflow in the repository owner's GitHub account (the person whose Vercel account is linked to the deployment). The workflow will automatically run whenever a push is made to the main branch. This will trigger the deployment to Vercel, ensuring that all team members' code gets deployed without needing each collaborator to have direct access to Vercel.

Implementing Solution 2

This is guide by vercel on how to use github actions with vercel you can refer this or continue reading......

So we start by creating a .github folder πŸ“ in root folder of the your app inside that create a production.yaml file πŸ—ƒοΈ.

.github/production/yaml
name: Vercel Production Deployment
env:
  VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
  VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
  push:
    branches:
      - main
jobs:
  Deploy-Production:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Install Vercel CLI
        run: npm install --global vercel@latest
      - name: Pull Vercel Environment Information
        run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
      - name: Build Project Artifacts
        run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
      - name: Deploy Project Artifacts to Vercel
        run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

Now after pushing this code your workflow will start but it will fail ☠️.

We need to add VERCEL_PROJECT_ID , VERCEL_ORG_ID, VERCEL_TOKEN to our github secrets to make it work.

Step to get:

  • VERCEL_TOKEN :
    Go to vercel > then to Account settings. Generate Token.
BlogImage
  • VERCEL_ORG_ID :
    Go to vercel > then to Settings Tab of the org in which your project is deployed > Copy TeamID(Team ID is ORG ID)
BlogImage
  • VERCEL_PROJECT_ID :
    Go to vercel > then to Projects Settings Tab > Copy ProjectID.
BlogImage

Now go to github where from which account your project is deployed on Vercel. Then go to

Settings Tab > Secrets and Variables > Actions

BlogImage

Add all the variable. Now push any change to main then now you can see your work flow to pass.

BlogImage

And there you have it! πŸŽ‰ After setting up a few secrets and configuring the workflow, you’re back to deploying without having to upgrade to Vercel Pro. Now you can keep collaborating with your team without spending extra. It might take a bit more effort, but at least it’s free! πŸ˜ŽπŸš€.

Thank you bye bye πŸ™‹β€β™‚οΈ

Want to hire me as a freelancer? Let's discuss.
Drop a message and let's discuss
Drop in your email ID and I will get back to you.
HomeAboutProjectsBlogsHire MeCrafts