Maximize Vercel’s FREE Plan: Enable Auto Deployment for All Members

Vercel’s free pricing plan allowed multiple members to commit changes that would automatically deploy. This feature has recently changed, and now only the project creator can trigger deployments. To enable this feature for each additional member, a fee of $20 will be charged. You can create a GitHub Action that performs an empty commit, triggering Vercel to deploy.


This content originally appeared on HackerNoon and was authored by Syed Muhammad Yaseen

\ Earlier, Vercel's free pricing plan allowed multiple members to commit changes that would automatically deploy. However, this feature has recently changed, and now only the project creator can trigger deployments.

\

\ To enable this feature for each additional member, a fee of $20 will be charged.

\

Bypass the Charge with a GitHub Action

\ You can create a GitHub Action that performs an empty commit, triggering Vercel to deploy automatically. Here’s how:

\

Step 1: Create the Workflow File

\

  1. Inside your repository, navigate to the .github/workflows directory. If the workflows folder doesn't exist, create it.

    \

  2. Add a file named auto-empty-commit.yml.

    \

Step 2: Add the Script

\ Paste the following code into auto-empty-commit.yml:

name: Auto Empty Commit

on:
  push:
    branches:
      - 'master' # Trigger on pushes to the master branch
      # - '**' # Uncomment to trigger on pushes to any branch

permissions:
  contents: write # Allow write access to repository contents

jobs:
  empty_commit:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Repository
        uses: actions/checkout@v2

      - name: Get the Latest Commit Branch
        id: get_branch
        run: echo "branch=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV

      - name: Create Empty Commit
        run: |
          git config --local user.name "example" # Replace with your name
          git config --local user.email "example@example.com" # Replace with your email
          git commit --allow-empty -m "Auto commit after push"
          git push origin ${{ env.branch }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

\

Customization

  1. Branch Configuration: Modify the on.push.branches section to specify which branch will trigger this action.

    \

  2. Git User Configuration: Update the Git user name and email in the Create Empty Commit step with the credentials of the member who created the project on Vercel.

    \

Final Steps

\

  1. Commit your changes and push them to your repository.

    \

  2. Now, when a commit is made, the action will create an empty commit, triggering Vercel to deploy automatically.

    \

You’ll know the deployment status by the commit icons: a cross ❌ indicates the deployment failed, while a check ✅ shows successful deployment.

\

\

Conclusion

That’s it! I hope you found this guide helpful. 🚀

\ Feel free to follow me on GitHub and LinkedIn for more JavaScript tips and tricks!

\ GitHub

LinkedIn


Stay awesome and happy coding! ✨


This content originally appeared on HackerNoon and was authored by Syed Muhammad Yaseen


Print Share Comment Cite Upload Translate Updates
APA

Syed Muhammad Yaseen | Sciencx (2024-10-03T12:49:41+00:00) Maximize Vercel’s FREE Plan: Enable Auto Deployment for All Members. Retrieved from https://www.scien.cx/2024/10/03/maximize-vercels-free-plan-enable-auto-deployment-for-all-members/

MLA
" » Maximize Vercel’s FREE Plan: Enable Auto Deployment for All Members." Syed Muhammad Yaseen | Sciencx - Thursday October 3, 2024, https://www.scien.cx/2024/10/03/maximize-vercels-free-plan-enable-auto-deployment-for-all-members/
HARVARD
Syed Muhammad Yaseen | Sciencx Thursday October 3, 2024 » Maximize Vercel’s FREE Plan: Enable Auto Deployment for All Members., viewed ,<https://www.scien.cx/2024/10/03/maximize-vercels-free-plan-enable-auto-deployment-for-all-members/>
VANCOUVER
Syed Muhammad Yaseen | Sciencx - » Maximize Vercel’s FREE Plan: Enable Auto Deployment for All Members. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/10/03/maximize-vercels-free-plan-enable-auto-deployment-for-all-members/
CHICAGO
" » Maximize Vercel’s FREE Plan: Enable Auto Deployment for All Members." Syed Muhammad Yaseen | Sciencx - Accessed . https://www.scien.cx/2024/10/03/maximize-vercels-free-plan-enable-auto-deployment-for-all-members/
IEEE
" » Maximize Vercel’s FREE Plan: Enable Auto Deployment for All Members." Syed Muhammad Yaseen | Sciencx [Online]. Available: https://www.scien.cx/2024/10/03/maximize-vercels-free-plan-enable-auto-deployment-for-all-members/. [Accessed: ]
rf:citation
» Maximize Vercel’s FREE Plan: Enable Auto Deployment for All Members | Syed Muhammad Yaseen | Sciencx | https://www.scien.cx/2024/10/03/maximize-vercels-free-plan-enable-auto-deployment-for-all-members/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.