File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -54,19 +54,25 @@ jobs:
54
54
name : dist-files
55
55
path : src/dist
56
56
57
+ - name : Set short git commit SHA
58
+ id : vars
59
+ run : |
60
+ calculatedSha=$(echo ${{ github.event.pull_request.head.sha }} | head -c 8)
61
+ echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
62
+
57
63
- name : Deploy to Cloudflare
58
64
id : deploy
59
65
uses : cloudflare/wrangler-action@v3
60
66
with :
61
67
apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
62
68
accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
63
- command : pages deploy src/dist --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }} --branch ${{ github.head_ref }} --commit-dirty=true
69
+ command : pages deploy src/dist --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }} --branch= ${{ env.COMMIT_SHORT_SHA }} --commit-dirty=true
64
70
65
71
- name : Add deployment comment
66
72
uses : thollander/actions-comment-pull-request@v3
67
73
with :
68
74
message : |
69
- Preview URL: ${{ steps.deploy.outputs.deployment-url }}
75
+ Preview URL: ${{ steps.deploy.outputs.pages- deployment-alias -url }}
70
76
reactions : eyes, rocket
71
77
comment-tag : ' Preview URL'
72
78
mode : recreate
You can’t perform that action at this time.
0 commit comments