Skip to content

Commit d8deda3

Browse files
committed
ci(content): update "Deploy Content"
prefer pull_request event instead of pull_request_target for security reason, because pull_request_target run without need approval
1 parent a5a8281 commit d8deda3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/deploy-content.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ name: Deploy Content
33
on:
44
push:
55
branches: [main]
6-
pull_request_target:
6+
pull_request:
77
types: [opened, reopened, synchronize, closed]
88

99
concurrency:
1010
group: deploy-content-${{ github.ref }}
1111

1212
env:
1313
STAGE: ${{ github.ref == 'refs/heads/main' && 'prod' || format('pr-{0}', github.event.number) }}
14-
COMMAND: ${{ github.event_name == 'pull_request_target' && github.event.action == 'closed' && 'destroy' || 'deploy' }}
14+
COMMAND: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' && 'destroy' || 'deploy' }}
1515
SHA: ${{ github.event.pull_request.head.sha || github.sha }}
1616

1717
jobs:

0 commit comments

Comments
 (0)