Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

Commit 3494b5b

Browse files
committed
Fix: Added debug for vercel url
1 parent 582ef8f commit 3494b5b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/pr-check.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,18 @@ jobs:
122122
- name: Get Vercel Preview URL
123123
id: vercel_url
124124
run: |
125-
PREVIEW_URL=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
126-
"https://api.github.com/repos/${{ github.repository }}/commits/${{ github.sha }}/statuses" \
127-
| jq -r '.statuses[] | select(.context=="Vercel") | .target_url' | head -n 1)
125+
RESPONSE=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
126+
"https://api.github.com/repos/${{ github.repository }}/commits/${{ github.sha }}/statuses")
127+
128+
echo "Response from API:"
129+
echo "$RESPONSE"
130+
131+
# Then you can try accessing the statuses only if it exists.
132+
PREVIEW_URL=$(echo "$RESPONSE" | jq -r '.statuses[] | select(.context=="Vercel") | .target_url' | head -n 1)
128133
129134
echo "Vercel preview URL: $PREVIEW_URL"
130-
echo "VERCEL_PREVIEW_URL=$PREVIEW_URL" >> $GITHUB_ENV
135+
echo "vercel_preview_url=$PREVIEW_URL" >> $GITHUB_OUTPUT
136+
131137

132138
run-smoke-test:
133139
needs: [smoke-tests-preparation]

0 commit comments

Comments
 (0)