| name | tsh-deploy |
| description | Vercel deployment workflow for TSH Clients Console. Use when:
(1) Deploying changes to production or staging
(2) Checking deployment status
(3) Troubleshooting deployment issues
(4) Setting up environment variables
(5) Managing domains and DNS
(6) Running cache revalidation after deployment
|
TSH Deployment
Quick Deploy
cd "/Users/khaleelal-mulla/General/ Projects/tsh-clients-console"
vercel --prod --yes
URLs
Deployment Workflow
1. Pre-deployment Checks
npm run build
npm run lint
vercel env ls
2. Deploy to Staging (Optional)
vercel --yes
3. Deploy to Production
vercel --prod --yes
4. Post-deployment
curl "https://www.tsh.sale/api/revalidate?tag=all&secret=tsh-revalidate-2024"
curl -I https://www.tsh.sale
Environment Variables
Required Variables (Vercel Dashboard)
ZOHO_CLIENT_ID=<client_id>
ZOHO_CLIENT_SECRET=<client_secret>
ZOHO_REFRESH_TOKEN=<refresh_token>
ZOHO_ORGANIZATION_ID=748369814
UPSTASH_REDIS_REST_URL=https://fine-mole-41883.upstash.io
UPSTASH_REDIS_REST_TOKEN=<token>
NEXTAUTH_URL=https://www.tsh.sale
NEXTAUTH_SECRET=<secret>
RESEND_API_KEY=<api_key>
EMAIL_FROM=TSH <noreply@tsh.sale>
Managing Variables
vercel env ls
vercel env add VARIABLE_NAME production preview
vercel env rm VARIABLE_NAME production preview
Domain Configuration
DNS Records (Namecheap):
www CNAME cname.vercel-dns.com
staging CNAME cname.vercel-dns.com
_vercel TXT <verification>
Common Issues
"Contact for price" after deploy
- Upstash Redis env vars missing
- Solution: Verify
UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN
Stock/prices not updating
- Cache needs revalidation
- Solution:
curl "https://www.tsh.sale/api/revalidate?tag=all&secret=tsh-revalidate-2024"
Build fails
- Type errors
- Solution: Run
npm run build locally first
OAuth errors
- Token expired
- Solution: Generate new refresh token in Zoho API Console
Vercel Dashboard
Rollback
vercel ls
vercel promote <deployment-url>
Cache Revalidation
curl "https://www.tsh.sale/api/revalidate?tag=all&secret=tsh-revalidate-2024"
curl "https://www.tsh.sale/api/revalidate?tag=products&secret=tsh-revalidate-2024"
curl "https://www.tsh.sale/api/revalidate?tag=price-lists&secret=tsh-revalidate-2024"
Deployment Checklist