Skip to content

Commit fb70fdf

Browse files
authored
Feature: allow the docs-build action to hint to subsequent steps to skip (#631)
1 parent 7444a23 commit fb70fdf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/preview-build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,22 +133,23 @@ jobs:
133133
- name: Build documentation
134134
if: github.repository != 'elastic/docs-builder' && (steps.deployment.outputs.result || (steps.check-files.outputs.any_modified == 'true' && github.event_name == 'merge_group'))
135135
uses: elastic/docs-builder@main
136+
id: docs-build
136137
continue-on-error: ${{ fromJSON(inputs.continue-on-error != '' && inputs.continue-on-error || 'false') }}
137138
with:
138139
prefix: ${{ env.PATH_PREFIX }}
139140
strict: ${{ fromJSON(inputs.strict != '' && inputs.strict || 'true') }}
140141

141142
- name: 'Validate Inbound Links'
143+
if: ${{ !cancelled() && steps.docs-build.outputs.skip != 'true' && (steps.deployment.outputs.result || (steps.check-files.outputs.any_modified == 'true' && github.event_name == 'merge_group')) }}
142144
uses: elastic/docs-builder/actions/validate-inbound-local@main
143145
continue-on-error: true
144-
if: ${{ !cancelled() && (steps.deployment.outputs.result || (steps.check-files.outputs.any_modified == 'true' && github.event_name == 'merge_group')) }}
145146

146147
- uses: elastic/docs-builder/.github/actions/aws-auth@main
147-
if: ${{ !cancelled() && steps.deployment.outputs.result }}
148+
if: ${{ !cancelled() && steps.docs-build.outputs.skip != 'true' && steps.deployment.outputs.result }}
148149

149150
- name: Upload to S3
150151
id: s3-upload
151-
if: ${{ !cancelled() && steps.deployment.outputs.result }}
152+
if: ${{ !cancelled() && steps.docs-build.outputs.skip != 'true' && steps.deployment.outputs.result }}
152153
run: |
153154
aws s3 sync .artifacts/docs/html "s3://elastic-docs-v3-website-preview${PATH_PREFIX}" --delete
154155
aws cloudfront create-invalidation \

0 commit comments

Comments
 (0)