Skip to content

Commit 03790c4

Browse files
Update vercel-preview.yml
1 parent 72782dc commit 03790c4

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/vercel-preview.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,34 @@ jobs:
1212
Deploy-Preview:
1313
runs-on: ubuntu-20.04
1414
environment:
15-
name: preview
15+
name: preview # Environment is linked here
16+
1617
steps:
1718
- uses: actions/checkout@v4
19+
1820
- name: Install Vercel CLI
1921
run: npm install --global vercel@latest
22+
2023
- name: Pull Vercel Environment Information
2124
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
25+
2226
- name: Build Project Artifacts
2327
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
28+
2429
- name: Deploy Project Artifacts to Vercel
2530
run: |
2631
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > deployment.txt
2732
id: deploy
33+
2834
- name: Extract Deployment URL
2935
run: |
3036
DEPLOYMENT_URL=$(tail -n 1 deployment.txt)
3137
echo "DEPLOYMENT_URL=$DEPLOYMENT_URL" >> $GITHUB_ENV
3238
id: extract-url
33-
- name: Set Environment URL
39+
40+
# Step to set URL for the deployment manually
41+
- name: Update Environment URL
3442
if: success()
35-
environment:
36-
name: preview
37-
url: ${{ env.DEPLOYMENT_URL }}
43+
run: echo "::set-output name=environment_url::${{ env.DEPLOYMENT_URL }}"
44+
env:
45+
DEPLOYMENT_URL: ${{ env.DEPLOYMENT_URL }}

0 commit comments

Comments
 (0)