Skip to content

Commit b162c47

Browse files
authored
chore: update workflow (#1081)
1 parent cd4934a commit b162c47

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/cloudflare-preview-deploy.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ on:
88
workflow_dispatch:
99

1010
concurrency:
11-
group: cloudflare-preview-${{ github.event.workflow_run.event.pull_request.number }}
11+
group: cloudflare-preview-${{ github.event.workflow_run.pull_requests[0].number }}
1212
cancel-in-progress: true
1313

1414
jobs:
1515
deploy-preview:
1616
runs-on: ubuntu-latest
17-
if: github.repository == 'doocs/md'
17+
if: github.repository == 'doocs/md' && github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success'
1818
permissions:
19+
actions: read
1920
contents: read
2021
deployments: write
2122
pull-requests: write
@@ -26,12 +27,18 @@ jobs:
2627
with:
2728
name: cloudflare-dist
2829
path: apps/web/dist
30+
github-token: ${{ secrets.GITHUB_TOKEN }}
31+
repository: ${{ github.repository }}
32+
run-id: ${{ github.event.workflow_run.id }}
2933

3034
- name: Download PR number
3135
uses: actions/download-artifact@v4
3236
with:
3337
name: cloudflare-pr
3438
path: .
39+
github-token: ${{ secrets.GITHUB_TOKEN }}
40+
repository: ${{ github.repository }}
41+
run-id: ${{ github.event.workflow_run.id }}
3542

3643
- name: Read PR number
3744
id: read-pr

0 commit comments

Comments
 (0)