11name : preview-build
22
33on :
4- pull_request_target :
4+ pull_request_target :
55 types :
66 - opened
77 - synchronize
@@ -34,7 +34,7 @@ permissions:
3434
3535jobs :
3636 build :
37- concurrency :
37+ concurrency :
3838 group : ${{ github.workflow }}-${{ github.event.pull_request.head.ref || github.ref }}
3939 cancel-in-progress : ${{ github.event_name == 'pull_request_target' }}
4040 runs-on : ubuntu-latest
@@ -46,14 +46,19 @@ jobs:
4646 uses : tj-actions/changed-files@d6e91a2266cdb9d62096cebf1e8546899c6aa18f # v45.0.6
4747 with :
4848 files : ${{ inputs.path-pattern != '' && inputs.path-pattern || '**' }}
49-
49+
50+ - name : Free Disk Space
51+ uses : jlumbroso/free-disk-space@main
52+ with :
53+ tool-cache : false
54+
5055 - name : Checkout
5156 if : github.event_name == 'push' || steps.check-files.outputs.any_changed == 'true'
5257 uses : actions/checkout@v4
53- with :
58+ with :
5459 ref : ${{ github.event.pull_request.head.sha || github.ref }}
5560 persist-credentials : false
56-
61+
5762 - name : Create Deployment
5863 if : github.event_name == 'push' || steps.check-files.outputs.any_changed == 'true'
5964 uses : actions/github-script@v7
8691 log_url: `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
8792 })
8893 return deployment.data.id
89-
94+
9095 - name : Generate env.PATH_PREFIX
9196 if : steps.deployment.outputs.result
9297 env :
@@ -113,7 +118,7 @@ jobs:
113118 - name : Bootstrap Action Workspace
114119 if : github.repository == 'elastic/docs-builder' && steps.deployment.outputs.result
115120 uses : ./.github/actions/bootstrap
116-
121+
117122 # we run our artifact directly please use the prebuild
118123 # elastic/docs-builder@main GitHub Action for all other repositories!
119124 - name : Build documentation
@@ -142,7 +147,7 @@ jobs:
142147 --paths "${PATH_PREFIX}" "${PATH_PREFIX}/*"
143148
144149 - name : Update Link Index
145- if : github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.s3-upload.outcome == 'success'
150+ if : github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.s3-upload.outcome == 'success'
146151 uses : elastic/docs-builder/actions/update-link-index@main
147152
148153 - name : Update deployment status
0 commit comments