Skip to content

Commit 44976bd

Browse files
authored
Update Deploy Preview to use pull_request_target
Access to secrets is not possible with PR from fork. Caution will need to be had around allowing commits to this yml file in the future. Not that secrets should not be available to code itself (actions with params only).
1 parent 69e2e36 commit 44976bd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

.github/workflows/deploy-preview.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 'Preview Deployment'
22
on:
3-
pull_request:
3+
pull_request_target:
44
branches:
55
- master
66

@@ -35,9 +35,6 @@ jobs:
3535
- name: Deploy to Cloudflare
3636
id: deploy
3737
uses: cloudflare/wrangler-action@v3
38-
env:
39-
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
40-
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
4138
with:
4239
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4340
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

0 commit comments

Comments
 (0)