Skip to content

Commit 817a66f

Browse files
authored
Run validations on branch builds when previewing in the docs-builder repo (#1867)
1 parent 76b6039 commit 817a66f

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/preview-build.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ jobs:
367367
env.MATCH == 'true'
368368
&& (
369369
!cancelled()
370+
&& github.repository != 'elastic/docs-builder'
370371
&& steps.docs-build.outputs.skip != 'true'
371372
&& (
372373
steps.deployment.outputs.result
@@ -377,12 +378,31 @@ jobs:
377378
)
378379
)
379380
uses: elastic/docs-builder/actions/validate-inbound-local@main
381+
382+
- name: 'Validate inbound links'
383+
if: >
384+
env.MATCH == 'true'
385+
&& (
386+
!cancelled()
387+
&& github.repository == 'elastic/docs-builder'
388+
&& steps.docs-build.outputs.skip != 'true'
389+
&& (
390+
steps.deployment.outputs.result
391+
|| (
392+
needs.check.outputs.any_modified == 'true'
393+
&& github.event_name == 'merge_group'
394+
)
395+
)
396+
)
397+
run: |
398+
dotnet run --project src/tooling/docs-builder -- inbound-links validate-link-reference
380399
381400
- name: 'Validate local path prefixes against those claimed by global navigation.yml'
382401
if: >
383402
env.MATCH == 'true'
384403
&& (
385404
!cancelled()
405+
&& github.repository != 'elastic/docs-builder'
386406
&& steps.docs-build.outputs.skip != 'true'
387407
&& (
388408
steps.deployment.outputs.result
@@ -393,6 +413,24 @@ jobs:
393413
)
394414
)
395415
uses: elastic/docs-builder/actions/validate-path-prefixes-local@main
416+
417+
- name: 'Validate local path prefixes against those claimed by global navigation.yml'
418+
if: >
419+
env.MATCH == 'true'
420+
&& (
421+
!cancelled()
422+
&& github.repository == 'elastic/docs-builder'
423+
&& steps.docs-build.outputs.skip != 'true'
424+
&& (
425+
steps.deployment.outputs.result
426+
|| (
427+
needs.check.outputs.any_modified == 'true'
428+
&& github.event_name == 'merge_group'
429+
)
430+
)
431+
)
432+
run: |
433+
dotnet run --project src/tooling/docs-builder -- path-prefixes validate-link-reference
396434
397435
- uses: elastic/docs-builder/.github/actions/aws-auth@main
398436
if: >

0 commit comments

Comments
 (0)