Skip to content

Commit fa2093d

Browse files
committed
Trigger reusable workflow in PR workflow
1 parent 5126893 commit fa2093d

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/pr.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
permissions:
77
contents: read
88
packages: read
9+
id-token: write
10+
pull-requests: write
11+
deployments: write
912

1013
concurrency:
1114
group: ${{ github.workflow }}-${{ github.ref }}
@@ -36,4 +39,17 @@ jobs:
3639
# we run our artifact directly please use the prebuild
3740
# elastic/docs-builder@main GitHub Action for all other repositories!
3841
- name: Build documentation
39-
run: .artifacts/publish/docs-builder/release/docs-builder --strict
42+
env:
43+
PR_NUMBER: ${{ github.event.pull_request.number }}
44+
run: .artifacts/publish/docs-builder/release/docs-builder --strict --path-prefix "/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}"
45+
46+
- uses: actions/upload-artifact@v4
47+
with:
48+
name: docs
49+
path: .artifacts/docs/html
50+
if-no-files-found: error
51+
retention-days: 1
52+
53+
preview:
54+
needs: build
55+
uses: ./.github/workflows/preview.yml

0 commit comments

Comments
 (0)