File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -12,26 +12,34 @@ jobs:
12
12
Deploy-Preview :
13
13
runs-on : ubuntu-20.04
14
14
environment :
15
- name : preview
15
+ name : preview # Environment is linked here
16
+
16
17
steps :
17
18
- uses : actions/checkout@v4
19
+
18
20
- name : Install Vercel CLI
19
21
run : npm install --global vercel@latest
22
+
20
23
- name : Pull Vercel Environment Information
21
24
run : vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
25
+
22
26
- name : Build Project Artifacts
23
27
run : vercel build --token=${{ secrets.VERCEL_TOKEN }}
28
+
24
29
- name : Deploy Project Artifacts to Vercel
25
30
run : |
26
31
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > deployment.txt
27
32
id : deploy
33
+
28
34
- name : Extract Deployment URL
29
35
run : |
30
36
DEPLOYMENT_URL=$(tail -n 1 deployment.txt)
31
37
echo "DEPLOYMENT_URL=$DEPLOYMENT_URL" >> $GITHUB_ENV
32
38
id : extract-url
33
- - name : Set Environment URL
39
+
40
+ # Step to set URL for the deployment manually
41
+ - name : Update Environment URL
34
42
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 }}
You can’t perform that action at this time.
0 commit comments