Skip to content

Commit 83ec526

Browse files
committed
build: Test production deployment
1 parent f7d56b8 commit 83ec526

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/actions/vercel/action.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ outputs:
2828
inspect-url:
2929
description: "Inspect URL"
3030
value: ${{ steps.deploy.outputs.inspect-url }}
31+
inspect-production-url:
32+
description: "Inspect Production URL"
33+
value: ${{ steps.deploy.outputs.inspect-production-url }}
3134
alias:
3235
description: "Alias"
3336
value: ${{ steps.alias.outputs.value }}
@@ -111,6 +114,18 @@ runs:
111114
echo "domain=$(cat ./domain.txt)" >> $GITHUB_OUTPUT
112115
echo "inspect-url=$(cat info.txt | grep 'Inspect:' | awk '{print $2}')" >> $GITHUB_OUTPUT
113116
117+
# Deploy with prod environment variables on staging and fill inspect-production-url
118+
if [ "${{ inputs.environment }}" = "staging" ]; then
119+
pnpx vercel deploy \
120+
--prebuilt \
121+
--prod \
122+
--skip-domain \
123+
--token ${{ inputs.vercel-token }} \
124+
2> >(tee prod_info.txt >&2) | tee prod_domain.txt
125+
126+
echo "inspect-production-url=$(cat prod_info.txt | grep 'Inspect:' | awk '{print $2}')" >> $GITHUB_OUTPUT
127+
fi
128+
114129
shell: bash
115130

116131
- name: Set Alias

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ jobs:
7474
description: "[${{ matrix.environment }}] Vercel logs"
7575
url: "${{ steps.vercel.outputs.inspect-url }}"
7676

77+
- uses: ./.github/actions/add-status
78+
if: ${{ steps.vercel.outputs.inspect-production-url != '' }}
79+
with:
80+
title: "🚀 [${{ matrix.environment }}] Vercel Production Inspection"
81+
description: "[${{ matrix.environment }}] Vercel production logs"
82+
url: "${{ steps.vercel.outputs.inspect-production-url }}"
83+
7784
- uses: ./.github/actions/add-status
7885
with:
7986
title: "⭐ [${{ matrix.environment }}] Apps Webstudio URL"

0 commit comments

Comments
 (0)