11name : preview
22
33on :
4- workflow_call : ~
4+ workflow_call :
5+ inputs :
6+ strict :
7+ type : boolean
8+ default : true
59
610permissions :
711 id-token : write
2428 owner,
2529 repo,
2630 ref: context.payload.pull_request.head.ref,
27- environment: `preview-${context.issue.number}`,
31+ environment: `docs- preview-${context.issue.number}`,
2832 description: `Preview deployment for PR ${context.issue.number}`,
2933 auto_merge: false,
3034 required_contexts: [],
@@ -42,19 +46,33 @@ jobs:
4246 - uses : actions/checkout@v4
4347
4448 - uses : actions/download-artifact@v4
49+ if : github.repository == 'elastic/docs-builder'
4550 with :
4651 name : docs-builder-binary
4752
4853 # we run our artifact directly please use the prebuild
4954 # elastic/docs-builder@main GitHub Action for all other repositories!
5055 - name : Build documentation
56+ if : github.repository == 'elastic/docs-builder'
5157 env :
52- PR_NUMBER : ${{ github.event.pull_request.number }}
58+ PR_NUMBER :
5359 run : |
5460 chmod +x ./docs-builder
55- ./docs-builder --strict --path-prefix "/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}"
61+ ./docs-builder --strict --path-prefix "/${GITHUB_REPOSITORY}/pull/${{ github.event.pull_request.number }}"
62+
63+ - name : Build documentation
64+ if : github.repository != 'elastic/docs-builder'
65+ run : |
66+ echo "Building documentation for ${GITHUB_REPOSITORY}"
67+ - name : Build public documentation
68+ if : github.repository != 'elastic/docs-builder'
69+ uses : elastic/docs-builder@main
70+ continue-on-error : ${{ inputs.strict != 'true' }} # Will be removed after the migration phase
71+ with :
72+ prefix : " /${{ github.repository }}/pull/${{ github.event.pull_request.number }}"
73+ strict : ${{ inputs.strict }}
5674
57- - uses : ./ .github/actions/aws-auth
75+ - uses : elastic/docs-builder/ .github/actions/aws-auth@main
5876
5977 - name : Upload to S3
6078 env :
0 commit comments