@intentsolutionsio/vercel-pack 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +67 -44
- package/package.json +4 -4
- package/skills/vercel-advanced-troubleshooting/SKILL.md +185 -195
- package/skills/vercel-advanced-troubleshooting/references/errors.md +11 -0
- package/skills/vercel-advanced-troubleshooting/references/evidence-collection-framework.md +34 -0
- package/skills/vercel-advanced-troubleshooting/references/examples.md +11 -0
- package/skills/vercel-advanced-troubleshooting/references/systematic-isolation.md +56 -0
- package/skills/vercel-advanced-troubleshooting/references/timing-analysis.md +35 -0
- package/skills/vercel-architecture-variants/SKILL.md +227 -216
- package/skills/vercel-architecture-variants/references/errors.md +11 -0
- package/skills/vercel-architecture-variants/references/examples.md +12 -0
- package/skills/vercel-architecture-variants/references/variant-a-monolith-(simple).md +44 -0
- package/skills/vercel-architecture-variants/references/variant-b-service-layer-(moderate).md +72 -0
- package/skills/vercel-architecture-variants/references/variant-c-microservice-(complex).md +81 -0
- package/skills/vercel-ci-integration/SKILL.md +183 -73
- package/skills/vercel-ci-integration/references/errors.md +10 -0
- package/skills/vercel-ci-integration/references/examples.md +36 -0
- package/skills/vercel-ci-integration/references/implementation.md +54 -0
- package/skills/vercel-common-errors/SKILL.md +164 -60
- package/skills/vercel-common-errors/references/errors.md +53 -0
- package/skills/vercel-common-errors/references/examples.md +23 -0
- package/skills/vercel-cost-tuning/SKILL.md +158 -145
- package/skills/vercel-cost-tuning/references/cost-estimation.md +34 -0
- package/skills/vercel-cost-tuning/references/cost-reduction-strategies.md +40 -0
- package/skills/vercel-cost-tuning/references/errors.md +11 -0
- package/skills/vercel-cost-tuning/references/examples.md +15 -0
- package/skills/vercel-data-handling/SKILL.md +202 -155
- package/skills/vercel-data-handling/references/errors.md +11 -0
- package/skills/vercel-data-handling/references/examples.md +27 -0
- package/skills/vercel-data-handling/references/implementation.md +223 -0
- package/skills/vercel-debug-bundle/SKILL.md +163 -67
- package/skills/vercel-debug-bundle/references/errors.md +12 -0
- package/skills/vercel-debug-bundle/references/examples.md +24 -0
- package/skills/vercel-debug-bundle/references/implementation.md +54 -0
- package/skills/vercel-deploy-integration/SKILL.md +163 -156
- package/skills/vercel-deploy-integration/references/errors.md +11 -0
- package/skills/vercel-deploy-integration/references/examples.md +21 -0
- package/skills/vercel-deploy-integration/references/google-cloud-run.md +36 -0
- package/skills/vercel-deploy-integration/references/vercel-deployment.md +35 -0
- package/skills/vercel-deploy-preview/SKILL.md +164 -39
- package/skills/vercel-edge-functions/SKILL.md +185 -37
- package/skills/vercel-enterprise-rbac/SKILL.md +185 -170
- package/skills/vercel-enterprise-rbac/references/errors.md +11 -0
- package/skills/vercel-enterprise-rbac/references/examples.md +12 -0
- package/skills/vercel-enterprise-rbac/references/role-implementation.md +33 -0
- package/skills/vercel-enterprise-rbac/references/sso-integration.md +35 -0
- package/skills/vercel-hello-world/SKILL.md +141 -55
- package/skills/vercel-incident-runbook/SKILL.md +186 -138
- package/skills/vercel-incident-runbook/references/errors.md +11 -0
- package/skills/vercel-incident-runbook/references/examples.md +10 -0
- package/skills/vercel-incident-runbook/references/immediate-actions-by-error-type.md +41 -0
- package/skills/vercel-install-auth/SKILL.md +130 -53
- package/skills/vercel-known-pitfalls/SKILL.md +235 -233
- package/skills/vercel-known-pitfalls/references/errors.md +11 -0
- package/skills/vercel-known-pitfalls/references/examples.md +12 -0
- package/skills/vercel-load-scale/SKILL.md +197 -204
- package/skills/vercel-load-scale/references/capacity-planning.md +47 -0
- package/skills/vercel-load-scale/references/errors.md +11 -0
- package/skills/vercel-load-scale/references/examples.md +26 -0
- package/skills/vercel-load-scale/references/load-testing-with-k6.md +59 -0
- package/skills/vercel-load-scale/references/scaling-patterns.md +65 -0
- package/skills/vercel-local-dev-loop/SKILL.md +159 -71
- package/skills/vercel-local-dev-loop/references/errors.md +11 -0
- package/skills/vercel-local-dev-loop/references/examples.md +21 -0
- package/skills/vercel-local-dev-loop/references/implementation.md +60 -0
- package/skills/vercel-migration-deep-dive/SKILL.md +202 -187
- package/skills/vercel-migration-deep-dive/references/errors.md +11 -0
- package/skills/vercel-migration-deep-dive/references/examples.md +12 -0
- package/skills/vercel-migration-deep-dive/references/implementation-plan.md +80 -0
- package/skills/vercel-migration-deep-dive/references/pre-migration-assessment.md +39 -0
- package/skills/vercel-multi-env-setup/SKILL.md +167 -164
- package/skills/vercel-multi-env-setup/references/configuration-structure.md +59 -0
- package/skills/vercel-multi-env-setup/references/errors.md +11 -0
- package/skills/vercel-multi-env-setup/references/examples.md +11 -0
- package/skills/vercel-observability/SKILL.md +205 -195
- package/skills/vercel-observability/references/alert-configuration.md +40 -0
- package/skills/vercel-observability/references/errors.md +11 -0
- package/skills/vercel-observability/references/examples.md +13 -0
- package/skills/vercel-observability/references/metrics-collection.md +65 -0
- package/skills/vercel-performance-tuning/SKILL.md +212 -156
- package/skills/vercel-performance-tuning/references/caching-strategy.md +49 -0
- package/skills/vercel-performance-tuning/references/errors.md +11 -0
- package/skills/vercel-performance-tuning/references/examples.md +13 -0
- package/skills/vercel-policy-guardrails/SKILL.md +276 -193
- package/skills/vercel-policy-guardrails/references/errors.md +11 -0
- package/skills/vercel-policy-guardrails/references/eslint-rules.md +46 -0
- package/skills/vercel-policy-guardrails/references/examples.md +10 -0
- package/skills/vercel-prod-checklist/SKILL.md +219 -94
- package/skills/vercel-prod-checklist/references/errors.md +11 -0
- package/skills/vercel-prod-checklist/references/examples.md +25 -0
- package/skills/vercel-prod-checklist/references/implementation.md +60 -0
- package/skills/vercel-rate-limits/SKILL.md +187 -100
- package/skills/vercel-rate-limits/references/errors.md +11 -0
- package/skills/vercel-rate-limits/references/examples.md +46 -0
- package/skills/vercel-rate-limits/references/implementation.md +66 -0
- package/skills/vercel-reference-architecture/SKILL.md +226 -180
- package/skills/vercel-reference-architecture/references/errors.md +11 -0
- package/skills/vercel-reference-architecture/references/examples.md +13 -0
- package/skills/vercel-reference-architecture/references/key-components.md +65 -0
- package/skills/vercel-reference-architecture/references/project-structure.md +40 -0
- package/skills/vercel-reliability-patterns/SKILL.md +272 -211
- package/skills/vercel-reliability-patterns/references/circuit-breaker.md +36 -0
- package/skills/vercel-reliability-patterns/references/dead-letter-queue.md +48 -0
- package/skills/vercel-reliability-patterns/references/errors.md +11 -0
- package/skills/vercel-reliability-patterns/references/examples.md +11 -0
- package/skills/vercel-reliability-patterns/references/idempotency-keys.md +36 -0
- package/skills/vercel-sdk-patterns/SKILL.md +264 -92
- package/skills/vercel-sdk-patterns/references/errors.md +11 -0
- package/skills/vercel-sdk-patterns/references/examples.md +45 -0
- package/skills/vercel-sdk-patterns/references/implementation.md +67 -0
- package/skills/vercel-security-basics/SKILL.md +186 -96
- package/skills/vercel-security-basics/references/errors.md +10 -0
- package/skills/vercel-security-basics/references/examples.md +70 -0
- package/skills/vercel-security-basics/references/implementation.md +39 -0
- package/skills/vercel-upgrade-migration/SKILL.md +167 -67
- package/skills/vercel-upgrade-migration/references/errors.md +10 -0
- package/skills/vercel-upgrade-migration/references/examples.md +51 -0
- package/skills/vercel-upgrade-migration/references/implementation.md +29 -0
- package/skills/vercel-webhooks-events/SKILL.md +208 -132
- package/skills/vercel-webhooks-events/references/errors.md +11 -0
- package/skills/vercel-webhooks-events/references/event-handler-pattern.md +37 -0
- package/skills/vercel-webhooks-events/references/examples.md +16 -0
- package/skills/vercel-webhooks-events/references/signature-verification.md +33 -0
|
@@ -1,209 +1,216 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vercel-deploy-integration
|
|
3
|
-
description:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
description: 'Deploy and manage Vercel production deployments with promotion, rollback,
|
|
4
|
+
and multi-region strategies.
|
|
5
|
+
|
|
6
|
+
Use when deploying to production, configuring deployment regions,
|
|
7
|
+
|
|
8
|
+
or setting up blue-green deployment patterns on Vercel.
|
|
9
|
+
|
|
10
|
+
Trigger with phrases like "deploy vercel", "vercel production deploy",
|
|
11
|
+
|
|
12
|
+
"vercel promote", "vercel rollback", "vercel regions".
|
|
13
|
+
|
|
14
|
+
'
|
|
15
|
+
allowed-tools: Read, Write, Edit, Bash(vercel:*), Bash(curl:*)
|
|
10
16
|
version: 1.0.0
|
|
11
17
|
license: MIT
|
|
12
18
|
author: Jeremy Longshore <jeremy@intentsolutions.io>
|
|
19
|
+
tags:
|
|
20
|
+
- saas
|
|
21
|
+
- vercel
|
|
22
|
+
- deployment
|
|
23
|
+
- production
|
|
24
|
+
- rollback
|
|
25
|
+
compatibility: Designed for Claude Code, also compatible with Codex and OpenClaw
|
|
13
26
|
---
|
|
14
|
-
|
|
15
27
|
# Vercel Deploy Integration
|
|
16
28
|
|
|
17
29
|
## Overview
|
|
18
|
-
|
|
30
|
+
|
|
31
|
+
Deploy Vercel applications to production using CLI, API, and Git-triggered workflows. Covers deployment promotion, instant rollback, rolling releases, multi-region function configuration, and deploy hooks for headless CMS integration.
|
|
19
32
|
|
|
20
33
|
## Prerequisites
|
|
21
|
-
- Vercel API keys for production environment
|
|
22
|
-
- Platform CLI installed (vercel, fly, or gcloud)
|
|
23
|
-
- Application code ready for deployment
|
|
24
|
-
- Environment variables documented
|
|
25
34
|
|
|
26
|
-
|
|
35
|
+
- Vercel project linked and configured
|
|
36
|
+
- Production environment variables set
|
|
37
|
+
- Custom domain configured (optional)
|
|
38
|
+
- `VERCEL_TOKEN` for API-based deployments
|
|
27
39
|
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
# Add Vercel secrets to Vercel
|
|
31
|
-
vercel secrets add vercel_api_key sk_live_***
|
|
32
|
-
vercel secrets add vercel_webhook_secret whsec_***
|
|
33
|
-
|
|
34
|
-
# Link to project
|
|
35
|
-
vercel link
|
|
40
|
+
## Instructions
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
vercel
|
|
42
|
+
### Step 1: Production Deploy Methods
|
|
39
43
|
|
|
40
|
-
|
|
44
|
+
```bash
|
|
45
|
+
# Method 1: CLI direct production deploy
|
|
41
46
|
vercel --prod
|
|
42
|
-
```
|
|
43
47
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
# Method 2: Promote a preview deployment to production
|
|
49
|
+
vercel promote https://my-app-preview-xxx.vercel.app
|
|
50
|
+
|
|
51
|
+
# Method 3: API-based deployment
|
|
52
|
+
curl -X POST "https://api.vercel.com/v13/deployments" \
|
|
53
|
+
-H "Authorization: Bearer $VERCEL_TOKEN" \
|
|
54
|
+
-H "Content-Type: application/json" \
|
|
55
|
+
-d '{
|
|
56
|
+
"name": "my-app",
|
|
57
|
+
"target": "production",
|
|
58
|
+
"gitSource": {
|
|
59
|
+
"type": "github",
|
|
60
|
+
"repoId": "123456789",
|
|
61
|
+
"ref": "main",
|
|
62
|
+
"sha": "'$(git rev-parse HEAD)'"
|
|
53
63
|
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Fly.io Deployment
|
|
59
|
-
|
|
60
|
-
### fly.toml
|
|
61
|
-
```toml
|
|
62
|
-
app = "my-vercel-app"
|
|
63
|
-
primary_region = "iad1"
|
|
64
|
-
|
|
65
|
-
[env]
|
|
66
|
-
NODE_ENV = "production"
|
|
64
|
+
}'
|
|
67
65
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
force_https = true
|
|
71
|
-
auto_stop_machines = true
|
|
72
|
-
auto_start_machines = true
|
|
66
|
+
# Method 4: Deploy Hook (for CMS-triggered rebuilds)
|
|
67
|
+
curl -X POST "https://api.vercel.com/v1/integrations/deploy/prj_xxx/hook_xxx"
|
|
73
68
|
```
|
|
74
69
|
|
|
75
|
-
###
|
|
70
|
+
### Step 2: Instant Rollback
|
|
71
|
+
|
|
76
72
|
```bash
|
|
77
|
-
#
|
|
78
|
-
|
|
79
|
-
fly secrets set VERCEL_WEBHOOK_SECRET=whsec_***
|
|
73
|
+
# Roll back to the previous production deployment (no rebuild)
|
|
74
|
+
vercel rollback
|
|
80
75
|
|
|
81
|
-
#
|
|
82
|
-
|
|
83
|
-
```
|
|
76
|
+
# Roll back to a specific deployment
|
|
77
|
+
vercel rollback dpl_xxxxxxxxxxxx
|
|
84
78
|
|
|
85
|
-
|
|
79
|
+
# Verify the rollback
|
|
80
|
+
vercel ls --prod
|
|
81
|
+
curl -s https://yourdomain.com/api/health | jq .
|
|
86
82
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
RUN npm ci --only=production
|
|
93
|
-
COPY . .
|
|
94
|
-
CMD ["npm", "start"]
|
|
83
|
+
# Via API — promote a known-good deployment
|
|
84
|
+
curl -X POST "https://api.vercel.com/v9/projects/my-app/promote" \
|
|
85
|
+
-H "Authorization: Bearer $VERCEL_TOKEN" \
|
|
86
|
+
-H "Content-Type: application/json" \
|
|
87
|
+
-d '{"deploymentId": "dpl_known_good_id"}'
|
|
95
88
|
```
|
|
96
89
|
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
#!/bin/bash
|
|
100
|
-
# deploy-cloud-run.sh
|
|
101
|
-
|
|
102
|
-
PROJECT_ID="${GOOGLE_CLOUD_PROJECT}"
|
|
103
|
-
SERVICE_NAME="vercel-service"
|
|
104
|
-
REGION="None"
|
|
105
|
-
|
|
106
|
-
# Build and push image
|
|
107
|
-
gcloud builds submit --tag gcr.io/$PROJECT_ID/$SERVICE_NAME
|
|
108
|
-
|
|
109
|
-
# Deploy to Cloud Run
|
|
110
|
-
gcloud run deploy $SERVICE_NAME \
|
|
111
|
-
--image gcr.io/$PROJECT_ID/$SERVICE_NAME \
|
|
112
|
-
--region $REGION \
|
|
113
|
-
--platform managed \
|
|
114
|
-
--allow-unauthenticated \
|
|
115
|
-
--set-secrets=VERCEL_API_KEY=vercel-api-key:latest
|
|
116
|
-
```
|
|
90
|
+
Key points:
|
|
117
91
|
|
|
118
|
-
|
|
92
|
+
- Instant rollback swaps production traffic without rebuilding
|
|
93
|
+
- The rolled-back deployment retains its original environment variables
|
|
94
|
+
- All production domains immediately point to the rolled-back deployment
|
|
119
95
|
|
|
120
|
-
|
|
121
|
-
// config/vercel.ts
|
|
122
|
-
interface VercelConfig {
|
|
123
|
-
apiKey: string;
|
|
124
|
-
environment: 'development' | 'staging' | 'production';
|
|
125
|
-
webhookSecret?: string;
|
|
126
|
-
}
|
|
96
|
+
### Step 3: Rolling Releases (Gradual Rollout)
|
|
127
97
|
|
|
128
|
-
|
|
129
|
-
const env = process.env.NODE_ENV || 'development';
|
|
98
|
+
Configure rolling releases in the dashboard under **Settings > Rolling Releases**:
|
|
130
99
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
100
|
+
```json
|
|
101
|
+
// vercel.json — rolling release config
|
|
102
|
+
{
|
|
103
|
+
"rollingRelease": {
|
|
104
|
+
"enabled": true,
|
|
105
|
+
"stages": [
|
|
106
|
+
{ "targetPercentage": 10, "duration": 300 },
|
|
107
|
+
{ "targetPercentage": 50, "duration": 600 },
|
|
108
|
+
{ "targetPercentage": 100 }
|
|
109
|
+
]
|
|
110
|
+
}
|
|
136
111
|
}
|
|
137
112
|
```
|
|
138
113
|
|
|
139
|
-
|
|
114
|
+
This routes 10% of traffic to the new deployment for 5 minutes, then 50% for 10 minutes, then 100%. If errors spike during any stage, rollback instantly.
|
|
140
115
|
|
|
141
|
-
|
|
142
|
-
// api/health.ts
|
|
143
|
-
export async function GET() {
|
|
144
|
-
const vercelStatus = await checkVercelConnection();
|
|
116
|
+
### Step 4: Multi-Region Function Configuration
|
|
145
117
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
118
|
+
```json
|
|
119
|
+
// vercel.json — deploy functions to specific regions
|
|
120
|
+
{
|
|
121
|
+
"regions": ["iad1", "sfo1", "cdg1", "hnd1"],
|
|
122
|
+
"functions": {
|
|
123
|
+
"api/user.ts": {
|
|
124
|
+
"memory": 1024,
|
|
125
|
+
"maxDuration": 30
|
|
150
126
|
},
|
|
151
|
-
|
|
152
|
-
|
|
127
|
+
"api/heavy-compute.ts": {
|
|
128
|
+
"memory": 3008,
|
|
129
|
+
"maxDuration": 60,
|
|
130
|
+
"regions": ["iad1"]
|
|
131
|
+
}
|
|
132
|
+
}
|
|
153
133
|
}
|
|
154
134
|
```
|
|
155
135
|
|
|
156
|
-
|
|
136
|
+
Available regions:
|
|
157
137
|
|
|
158
|
-
|
|
159
|
-
|
|
138
|
+
| Region | Location | Code |
|
|
139
|
+
|--------|----------|------|
|
|
140
|
+
| Washington, D.C. | US East | `iad1` |
|
|
141
|
+
| San Francisco | US West | `sfo1` |
|
|
142
|
+
| Paris | Europe | `cdg1` |
|
|
143
|
+
| Tokyo | Asia | `hnd1` |
|
|
144
|
+
| Sydney | Australia | `syd1` |
|
|
145
|
+
| S. Paulo | South America | `gru1` |
|
|
146
|
+
| London | Europe | `lhr1` |
|
|
160
147
|
|
|
161
|
-
### Step
|
|
162
|
-
Store Vercel API keys securely using the platform's secrets management.
|
|
148
|
+
### Step 5: Deploy Hooks (CMS Triggers)
|
|
163
149
|
|
|
164
|
-
|
|
165
|
-
Use the platform CLI to deploy your application with Vercel integration.
|
|
150
|
+
Create deploy hooks in **Settings > Git > Deploy Hooks**:
|
|
166
151
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
## Output
|
|
171
|
-
- Application deployed to production
|
|
172
|
-
- Vercel secrets securely configured
|
|
173
|
-
- Health check endpoint functional
|
|
174
|
-
- Environment-specific configuration in place
|
|
152
|
+
```bash
|
|
153
|
+
# Create via dashboard, then trigger with POST
|
|
154
|
+
curl -X POST "https://api.vercel.com/v1/integrations/deploy/prj_xxx/hook_xxx"
|
|
175
155
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
| Health check fails | Wrong API key | Verify environment variable |
|
|
182
|
-
| Cold start issues | No warm-up | Configure minimum instances |
|
|
156
|
+
# Common CMS integrations:
|
|
157
|
+
# Contentful — webhook URL → Vercel deploy hook
|
|
158
|
+
# Sanity — GROQ listener → deploy hook
|
|
159
|
+
# Strapi — lifecycle hook → deploy hook
|
|
160
|
+
```
|
|
183
161
|
|
|
184
|
-
|
|
162
|
+
### Step 6: Deployment Monitoring
|
|
185
163
|
|
|
186
|
-
### Quick Deploy Script
|
|
187
164
|
```bash
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
165
|
+
# List recent production deployments
|
|
166
|
+
vercel ls --prod --limit=5
|
|
167
|
+
|
|
168
|
+
# Check deployment state
|
|
169
|
+
curl -s -H "Authorization: Bearer $VERCEL_TOKEN" \
|
|
170
|
+
"https://api.vercel.com/v6/deployments?target=production&limit=5&projectId=prj_xxx" \
|
|
171
|
+
| jq '.deployments[] | {uid, url, state, createdAt}'
|
|
172
|
+
|
|
173
|
+
# Monitor deployment logs in real-time
|
|
174
|
+
vercel logs https://yourdomain.com --follow
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Deploy Lifecycle
|
|
178
|
+
|
|
200
179
|
```
|
|
180
|
+
git push main
|
|
181
|
+
→ Vercel builds (BUILDING)
|
|
182
|
+
→ Build succeeds (READY)
|
|
183
|
+
→ Traffic routes to new deployment
|
|
184
|
+
→ Old deployment kept for instant rollback
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Output
|
|
188
|
+
|
|
189
|
+
- Production deployment live via CLI, API, or Git push
|
|
190
|
+
- Instant rollback configured to previous deployment
|
|
191
|
+
- Rolling releases for gradual traffic shifting
|
|
192
|
+
- Function regions optimized for user geography
|
|
193
|
+
- Deploy hooks for CMS-triggered rebuilds
|
|
194
|
+
|
|
195
|
+
## Error Handling
|
|
196
|
+
|
|
197
|
+
| Error | Cause | Solution |
|
|
198
|
+
|-------|-------|----------|
|
|
199
|
+
| `DEPLOYMENT_BLOCKED` | Deployment freeze or branch protection | Disable freeze in Settings or use --force |
|
|
200
|
+
| Promotion fails | Preview deployment has different env vars | Verify env vars match between preview and production |
|
|
201
|
+
| Rolling release stuck | Error threshold exceeded | Fix the code, then restart the rollout |
|
|
202
|
+
| Deploy hook returns 404 | Hook deleted or project ID wrong | Recreate the hook in Settings > Git |
|
|
203
|
+
| Region not available | Plan doesn't support multi-region | Upgrade to Pro or Enterprise |
|
|
201
204
|
|
|
202
205
|
## Resources
|
|
203
|
-
|
|
204
|
-
- [
|
|
205
|
-
- [
|
|
206
|
-
- [
|
|
206
|
+
|
|
207
|
+
- [Deploying to Vercel](https://vercel.com/docs/deployments)
|
|
208
|
+
- [Instant Rollback](https://vercel.com/docs/instant-rollback)
|
|
209
|
+
- [Rolling Releases](https://vercel.com/docs/rolling-releases)
|
|
210
|
+
- [Promoting Deployments](https://vercel.com/docs/deployments/promoting-a-deployment)
|
|
211
|
+
- [Deploy Hooks](https://vercel.com/docs/deploy-hooks)
|
|
212
|
+
- [Function Regions](https://vercel.com/docs/functions/configuring-functions)
|
|
207
213
|
|
|
208
214
|
## Next Steps
|
|
209
|
-
|
|
215
|
+
|
|
216
|
+
For webhook integration, see `vercel-webhooks-events`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Error Handling Reference
|
|
2
|
+
|
|
3
|
+
| Issue | Cause | Solution |
|
|
4
|
+
|-------|-------|----------|
|
|
5
|
+
| Secret not found | Missing configuration | Add secret via platform CLI |
|
|
6
|
+
| Deploy timeout | Large build | Increase build timeout |
|
|
7
|
+
| Health check fails | Wrong API key | Verify environment variable |
|
|
8
|
+
| Cold start issues | No warm-up | Configure minimum instances |
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
*[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## Examples
|
|
2
|
+
|
|
3
|
+
### Quick Deploy Script
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
#!/bin/bash
|
|
7
|
+
# Platform-agnostic deploy helper
|
|
8
|
+
case "$1" in
|
|
9
|
+
vercel)
|
|
10
|
+
vercel secrets add vercel_api_key "$VERCEL_API_KEY"
|
|
11
|
+
vercel --prod
|
|
12
|
+
;;
|
|
13
|
+
fly)
|
|
14
|
+
fly secrets set VERCEL_API_KEY="$VERCEL_API_KEY"
|
|
15
|
+
fly deploy
|
|
16
|
+
;;
|
|
17
|
+
esac
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
*[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Google Cloud Run
|
|
2
|
+
|
|
3
|
+
## Google Cloud Run
|
|
4
|
+
|
|
5
|
+
### Dockerfile
|
|
6
|
+
|
|
7
|
+
```dockerfile
|
|
8
|
+
FROM node:20-slim
|
|
9
|
+
WORKDIR /app
|
|
10
|
+
COPY package*.json ./
|
|
11
|
+
RUN npm ci --only=production
|
|
12
|
+
COPY . .
|
|
13
|
+
CMD ["npm", "start"]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Deploy Script
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
#!/bin/bash
|
|
20
|
+
# deploy-cloud-run.sh
|
|
21
|
+
|
|
22
|
+
PROJECT_ID="${GOOGLE_CLOUD_PROJECT}"
|
|
23
|
+
SERVICE_NAME="vercel-service"
|
|
24
|
+
REGION="None"
|
|
25
|
+
|
|
26
|
+
# Build and push image
|
|
27
|
+
gcloud builds submit --tag gcr.io/$PROJECT_ID/$SERVICE_NAME
|
|
28
|
+
|
|
29
|
+
# Deploy to Cloud Run
|
|
30
|
+
gcloud run deploy $SERVICE_NAME \
|
|
31
|
+
--image gcr.io/$PROJECT_ID/$SERVICE_NAME \
|
|
32
|
+
--region $REGION \
|
|
33
|
+
--platform managed \
|
|
34
|
+
--allow-unauthenticated \
|
|
35
|
+
--set-secrets=VERCEL_API_KEY=vercel-api-key:latest
|
|
36
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Vercel Deployment
|
|
2
|
+
|
|
3
|
+
## Vercel Deployment
|
|
4
|
+
|
|
5
|
+
### Environment Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Add Vercel secrets to Vercel
|
|
9
|
+
vercel secrets add vercel_api_key sk_live_***
|
|
10
|
+
vercel secrets add vercel_webhook_secret whsec_***
|
|
11
|
+
|
|
12
|
+
# Link to project
|
|
13
|
+
vercel link
|
|
14
|
+
|
|
15
|
+
# Deploy preview
|
|
16
|
+
vercel
|
|
17
|
+
|
|
18
|
+
# Deploy production
|
|
19
|
+
vercel --prod
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### vercel.json Configuration
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"env": {
|
|
27
|
+
"VERCEL_API_KEY": "@vercel_api_key"
|
|
28
|
+
},
|
|
29
|
+
"functions": {
|
|
30
|
+
"api/**/*.ts": {
|
|
31
|
+
"maxDuration": 30
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|