Skip to content

Commit 16cb48d

Browse files
authored
Merge pull request #205 from codeunia-dev/production-readiness-improvements
Production readiness improvements
2 parents 77f6217 + 8a176b2 commit 16cb48d

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

.github/workflows/ci-cd.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -262,18 +262,12 @@ jobs:
262262
- name: Install Vercel CLI
263263
run: npm install -g vercel@latest
264264

265-
- name: Link Vercel Project
266-
run: |
267-
# Create .vercel directory and project.json to link the project
268-
mkdir -p .vercel
269-
echo '{"orgId":"${{ secrets.VERCEL_ORG_ID }}","projectId":"${{ secrets.VERCEL_PROJECT_ID }}"}' > .vercel/project.json
270-
env:
271-
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
272-
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
273-
274265
- name: Deploy to Vercel (Staging)
275266
run: |
276-
vercel --token ${{ secrets.VERCEL_TOKEN }} --yes
267+
# Remove any existing .vercel directory to avoid conflicts
268+
rm -rf .vercel
269+
# Deploy directly with project ID (no linking required)
270+
vercel --token ${{ secrets.VERCEL_TOKEN }} --yes --project ${{ secrets.VERCEL_PROJECT_ID }}
277271
env:
278272
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
279273
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
@@ -303,18 +297,12 @@ jobs:
303297
- name: Install Vercel CLI
304298
run: npm install -g vercel@latest
305299

306-
- name: Link Vercel Project
307-
run: |
308-
# Create .vercel directory and project.json to link the project
309-
mkdir -p .vercel
310-
echo '{"orgId":"${{ secrets.VERCEL_ORG_ID }}","projectId":"${{ secrets.VERCEL_PROJECT_ID }}"}' > .vercel/project.json
311-
env:
312-
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
313-
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
314-
315300
- name: Deploy to Vercel (Production)
316301
run: |
317-
vercel --prod --token ${{ secrets.VERCEL_TOKEN }} --yes
302+
# Remove any existing .vercel directory to avoid conflicts
303+
rm -rf .vercel
304+
# Deploy directly with project ID (no linking required)
305+
vercel --prod --token ${{ secrets.VERCEL_TOKEN }} --yes --project ${{ secrets.VERCEL_PROJECT_ID }}
318306
env:
319307
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
320308
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

0 commit comments

Comments
 (0)