Skip to content

Commit 8830c60

Browse files
committed
Set build settings for preview env
1 parent e42ae46 commit 8830c60

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ jobs:
2020
node-version: 22
2121
- run: npm ci
2222
- run: npx wrangler whoami
23-
- run: npm run build
24-
- name: Deploy --preview-alias
23+
- name: Deploy preview
2524
if: "${{ github.ref_name != 'main' }}"
26-
run: npx wrangler versions upload --preview-alias "${{ github.ref_name }}"
27-
- name: Deploy production
28-
if: "${{ github.ref_name == 'main' }}"
2925
env:
3026
IS_PREVIEW_ENV: true
31-
run: npx wrangler deploy
27+
run: npm run build && npx wrangler versions upload --preview-alias "${{ github.ref_name }}"
28+
- name: Deploy production
29+
if: "${{ github.ref_name == 'main' }}"
30+
run: npm run build && npx wrangler deploy

0 commit comments

Comments
 (0)