Skip to content

Commit 155f2ee

Browse files
committed
Update documentation
1 parent 7bdceac commit 155f2ee

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/migration/guide/how-to-set-up-docs-previews.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,25 @@ This way you only build and deploy the docs when there are changes to the docs a
2525
name: docs-build <1>
2626

2727
on:
28+
push: <2>
29+
- branches:
30+
- main
2831
pull_request: ~
2932

3033
jobs:
3134
docs-preview:
32-
uses: elastic/docs-builder/.github/workflows/preview-build.yml <2>
35+
uses: elastic/docs-builder/.github/workflows/preview-build.yml <3>
3336
with:
34-
path-pattern: docs/** <3>
37+
path-pattern: docs/** <4>
3538
permissions:
3639
contents: read
3740
pull-requests: read
3841
```
3942
4043
1. The naming is important so that the `docs-deploy` workflow is triggered.
41-
2. This should be the path to your docs folder.
42-
3. Reusable workflow: [elastic/docs-builder/.github/workflows/preview-build.yml](https://github.com/elastic/docs-builder/blob/main/.github/workflows/preview-build.yml)
44+
2. You can omit the `push` event if you only want to build the docs on PRs.
45+
3. This should be the path to your docs folder.
46+
4. Reusable workflow: [elastic/docs-builder/.github/workflows/preview-build.yml](https://github.com/elastic/docs-builder/blob/main/.github/workflows/preview-build.yml)
4347

4448

4549
::::

0 commit comments

Comments
 (0)