Skip to content

Commit ebc4a92

Browse files
committed
preview-builds: Add preview-url-path input
This way we can set `/reference` for reference repos
1 parent 232421a commit ebc4a92

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/preview-build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ on:
3030
type: string
3131
default: 'false'
3232
required: false
33+
preview-url-path:
34+
description: 'Path to the preview URL'
35+
type: string
36+
required: false
37+
default: ''
3338

3439
permissions:
3540
id-token: write
@@ -169,13 +174,14 @@ jobs:
169174
if: always() && steps.deployment.outputs.result
170175
env:
171176
PR_NUMBER: ${{ github.event.pull_request.number }}
177+
PREVIEW_URL_PATH: ${{ inputs.preview-url-path }}
172178
with:
173179
script: |
174180
await github.rest.repos.createDeploymentStatus({
175181
owner: context.repo.owner,
176182
repo: context.repo.repo,
177183
deployment_id: ${{ steps.deployment.outputs.result }},
178184
state: "${{ steps.docs-build.outputs.skip == 'true' && 'inactive' || (steps.s3-upload.outcome == 'success' && 'success' || 'failure') }}",
179-
environment_url: `https://docs-v3-preview.elastic.dev${process.env.PATH_PREFIX}`,
185+
environment_url: `https://docs-v3-preview.elastic.dev${process.env.PATH_PREFIX}${PREVIEW_URL_PATH}`,
180186
log_url: `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
181187
})

0 commit comments

Comments
 (0)