@@ -36,18 +36,19 @@ jobs:
3636 build :
3737 concurrency :
3838 group : ${{ github.workflow }}-${{ github.event.pull_request.head.ref || github.ref }}
39- cancel-in-progress : ${{ github.event_name == 'pull_request_target' }}
39+ cancel-in-progress : ${{ startsWith( github.event_name, 'pull_request') }}
4040 runs-on : ubuntu-latest
4141 steps :
4242
4343 - name : Get changed files
44- if : github.event_name == 'pull_request_target '
44+ if : startsWith( github.event_name, 'pull_request') || github.event_name == 'merge_group '
4545 id : check-files
4646 uses : tj-actions/changed-files@d6e91a2266cdb9d62096cebf1e8546899c6aa18f # v45.0.6
4747 with :
4848 files : ${{ inputs.path-pattern != '' && inputs.path-pattern || '**' }}
4949
5050 - name : Free Disk Space
51+ if : github.event_name != 'merge_group'
5152 uses : jlumbroso/free-disk-space@main
5253 with :
5354 tool-cache : false
5859 with :
5960 ref : ${{ github.event.pull_request.head.sha || github.ref }}
6061 persist-credentials : false
61-
62+
6263 - name : Create Deployment
63- if : github.event_name == 'push' || steps.check-files.outputs.any_changed == 'true'
64+ if : github.event_name == 'push' || ( steps.check-files.outputs.any_changed == 'true' && startsWith(github.event_name, 'pull_request'))
6465 uses : actions/github-script@v7
6566 id : deployment
6667 env :
@@ -127,15 +128,15 @@ jobs:
127128 dotnet run --project src/docs-builder -- --strict --path-prefix "${PATH_PREFIX}"
128129
129130 - name : Build documentation
130- if : github.repository != 'elastic/docs-builder' && steps.deployment.outputs.result
131+ if : github.repository != 'elastic/docs-builder' && steps.deployment.outputs.result || github.event_name == 'merge_group'
131132 uses : elastic/docs-builder@main
132133 continue-on-error : ${{ fromJSON(inputs.continue-on-error != '' && inputs.continue-on-error || 'false') }}
133134 with :
134135 prefix : ${{ env.PATH_PREFIX }}
135136 strict : ${{ fromJSON(inputs.strict != '' && inputs.strict || 'true') }}
136137
137138 - uses : elastic/docs-builder/actions/validate-inbound-local@main
138- if : ${{ !cancelled() && steps.deployment.outputs.result }}
139+ if : ${{ !cancelled() && ( steps.deployment.outputs.result || github.event_name == 'merge_group') }}
139140
140141 - uses : elastic/docs-builder/.github/actions/aws-auth@main
141142 if : ${{ !cancelled() && steps.deployment.outputs.result }}
0 commit comments