Skip to content

Commit ea9fdd3

Browse files
committed
Try prod release again
1 parent f7d56b8 commit ea9fdd3

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.github/actions/vercel/action.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ runs:
7676
export GITHUB_SHA=${{ inputs.sha }}
7777
export GITHUB_REF_NAME=${{ inputs.ref-name }}
7878
79-
pnpx vercel build
79+
if [ "${{ inputs.environment }}" = "production" ]; then
80+
pnpx vercel build --prod
81+
else
82+
pnpx vercel build
83+
fi
8084
shell: bash
8185

8286
- name: Patch
@@ -103,8 +107,14 @@ runs:
103107
- name: Deploy
104108
id: deploy
105109
run: |
110+
PROD_FLAGS=""
111+
if [ "${{ inputs.environment }}" = "production" ]; then
112+
PROD_FLAGS="--prod --skip-domain"
113+
fi
114+
106115
pnpx vercel deploy \
107116
--prebuilt \
117+
$PROD_FLAGS \
108118
--token ${{ inputs.vercel-token }} \
109119
2> >(tee info.txt >&2) | tee domain.txt
110120

.github/workflows/vercel-deploy-staging.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ jobs:
6262
sha: ${{ github.sha }}
6363
environment: ${{ matrix.environment }}
6464

65+
- uses: ./.github/actions/vercel
66+
if: matrix.environment == 'staging'
67+
id: vercel-prod
68+
name: Deploy to Vercel
69+
with:
70+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
71+
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
72+
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
73+
ref-name: ${{ github.ref_name }}
74+
sha: ${{ github.sha }}
75+
environment: "production"
76+
6577
- name: Debug Vercel Outputs
6678
run: |
6779
echo "domain=${{ steps.vercel.outputs.domain }}"
@@ -74,6 +86,13 @@ jobs:
7486
description: "[${{ matrix.environment }}] Vercel logs"
7587
url: "${{ steps.vercel.outputs.inspect-url }}"
7688

89+
- uses: ./.github/actions/add-status
90+
if: matrix.environment == 'staging'
91+
with:
92+
title: "⏰ [${{ matrix.environment }}] Vercel Production Inspection"
93+
description: "[${{ matrix.environment }}] Vercel production logs"
94+
url: "${{ steps.vercel-prod.outputs.inspect-url }}"
95+
7796
- uses: ./.github/actions/add-status
7897
with:
7998
title: "⭐ [${{ matrix.environment }}] Apps Webstudio URL"

0 commit comments

Comments
 (0)