Auto-Deploy to Vercel on Git Push
Developer ToolsBeginner5 minutes setup
Auto-Deploy to Vercel on Git Push
Stop clicking "Deploy" manually. Automate your entire Vercel deployment pipeline.
What You'll Build
An automated deployment workflow:
- Listens for git pushes to main/staging branches
- Triggers Vercel deployment
- Sends deployment status to Telegram
- Supports instant rollback with a message
Requirements
- Plugins: Vercel (from Lobstash.ai)
- Time: 5 minutes
- Vercel Account: With API token
Setup
1. Install Vercel Plugin
Add the Vercel plugin and authenticate:
Connect Vercel account
Project: my-nextjs-app
2. Configure Deployment Rules
When I push to:
- main branch → deploy to production
- staging branch → deploy to preview
Send deployment status to my Telegram after each push.
3. Add Rollback Command
When I say "rollback [project-name]":
- Revert to previous successful deployment
- Confirm action before executing
- Notify me when complete
4. Set Up Pre-Deployment Checks
Before deploying:
- Check if build passed
- Verify environment variables are set
- Ensure domain DNS is configured
Sample Workflow
Push to main:
git push origin main
Agent Response (Telegram):
🚀 Deployment Started
Project: my-nextjs-app
Branch: main
Commit: a3f92b1 "Add new landing page"
Building... ⏳
2 minutes later:
✅ Deployment Successful
URL: https://my-app.vercel.app
Time: 1m 42s
Changes live in production
[View deployment →](https://vercel.com/...)
Rollback Example
You: "rollback my-nextjs-app"
Agent:
⚠️ Rollback Requested
Current: v127 (deployed 3h ago)
Rolling back to: v126 (deployed 5h ago)
Confirm? Reply YES to proceed.
You: "YES"
Agent:
⏪ Rolling back...
✅ Rollback Complete
Now serving: v126
URL: https://my-app.vercel.app
Review before redeploying.
Pro Tips
- Branch Protection: Set up preview deployments for all PRs
- Build Alerts: Get notified only if build fails (reduce noise)
- Performance Tracking: Log deployment times and optimize
- Multi-Project: Manage deployments for multiple Vercel projects
Automate your deployments → Launch Claws