File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,9 +156,6 @@ jobs:
156156 if : ' !cancelled()'
157157 name : Documentation
158158 runs-on : ubuntu-latest
159- concurrency :
160- group : gh-pages-deploy
161- cancel-in-progress : false
162159 steps :
163160 - uses : actions/checkout@v6
164161 - uses : julia-actions/setup-julia@v2
Original file line number Diff line number Diff line change 1212 cleanup :
1313 name : Cleanup documentation preview
1414 runs-on : ubuntu-latest
15- concurrency :
16- group : gh-pages-deploy
17- cancel-in-progress : false
1815 steps :
1916 - uses : actions/checkout@v6
2017 with :
Original file line number Diff line number Diff line change 1010 - master
1111
1212permissions :
13+ actions : read
1314 issues : write
1415 pull-requests : write
1516
1617jobs :
1718 comment :
18- if : >-
19- github.event.workflow_run.event == 'pull_request' &&
20- github.event.workflow_run.conclusion == 'success'
19+ if : github.event.workflow_run.event == 'pull_request'
2120 name : Comment documentation preview URL
2221 runs-on : ubuntu-latest
2322 steps :
4443 return;
4544 }
4645
46+ if (data.head.sha !== context.payload.workflow_run.head_sha) {
47+ core.info('Workflow run is not for the current pull request head.');
48+ return;
49+ }
50+
51+ const jobs = await github.paginate(github.rest.actions.listJobsForWorkflowRun, {
52+ owner: context.repo.owner,
53+ repo: context.repo.repo,
54+ run_id: context.payload.workflow_run.id,
55+ per_page: 100,
56+ });
57+
58+ const docsJob = jobs.find(job => job.name === 'Documentation');
59+ if (docsJob?.conclusion !== 'success') {
60+ core.info(`Documentation job conclusion: ${docsJob?.conclusion ?? 'missing'}.`);
61+ return;
62+ }
63+
4764 core.setOutput('number', pr.number);
4865
4966 - name : Comment preview URL
You can’t perform that action at this time.
0 commit comments