Skip to content

Commit 7d9632f

Browse files
Add path-pattern to docs (#607)
* Update move-ref-docs.md * Update move-ref-docs.md * Apply suggestions from code review * Update docs/migration/guide/move-ref-docs.md * Update docs/migration/guide/move-ref-docs.md Co-authored-by: Jan Calanog <[email protected]> * move to bottom so it's alligned with pr target --------- Co-authored-by: Jan Calanog <[email protected]>
1 parent dbd6270 commit 7d9632f

File tree

1 file changed

+54
-7
lines changed

1 file changed

+54
-7
lines changed

docs/migration/guide/move-ref-docs.md

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,62 @@ Example commit: [#398/commit](https://github.com/elastic/apm-agent-android/pull/
9595

9696
### Step 3: Add the new CI checks
9797

98-
**docs-build**
99-
* The file to add: [`github/workflows/docs-build.yml`](https://github.com/elastic/docs-content/blob/main/.github/workflows/docs-build.yml)
100-
* The path and name of the new file: `.github/workflows/docs-build.yml`
98+
There are two CI checks to add:
99+
100+
**`docs-build.yml`**
101+
Add a file named `docs-build.yml` at `.github/workflows/docs-build.yml`. The contents of this file are below:
102+
103+
```yml
104+
name: docs-build
105+
106+
on:
107+
push:
108+
branches:
109+
- main
110+
pull_request_target: ~
111+
merge_group: ~
112+
113+
jobs:
114+
docs-preview:
115+
uses: elastic/docs-builder/.github/workflows/preview-build.yml@main
116+
with:
117+
path-pattern: docs/**
118+
permissions:
119+
deployments: write
120+
id-token: write
121+
contents: read
122+
pull-requests: read
123+
```
124+
125+
Learn more about this file: [`docs-build.yml`](./how-to-set-up-docs-previews.md#build).
126+
127+
:::{important}
128+
If the documentation you are adding will not live in the `/docs/*` dir of the repository, you must update the `path-pattern` appropriately. Please reach out in #docs-team if you need help with this.
129+
:::
130+
131+
**`docs-cleanup.yml`**
132+
Add a file named `docs-cleanup.yml` at `.github/workflows/docs-cleanup.yml`. The contents of this file are below:
133+
134+
```yml
135+
name: docs-cleanup
136+
137+
on:
138+
pull_request_target:
139+
types:
140+
- closed
141+
142+
jobs:
143+
docs-preview:
144+
uses: elastic/docs-builder/.github/workflows/preview-cleanup.yml@main
145+
permissions:
146+
contents: none
147+
id-token: write
148+
deployments: write
149+
```
101150

102-
**docs-cleanup**
103-
* The file to add: [`.github/workflows/docs-cleanup.yml`](https://github.com/elastic/docs-content/blob/main/.github/workflows/docs-cleanup.yml)
104-
* The path and name of the new file: `.github/workflows/docs-cleanup.yml`
151+
Learn more about this file: [`docs-cleanup.yml`](./how-to-set-up-docs-previews.md#cleanup)
105152

106-
Example commit: [#398/commit](https://github.com/elastic/apm-agent-android/pull/398/commits/e869386bbf4af23d51432226f1fd3935d233e43d)
153+
Example PR: [#398](https://github.com/elastic/apm-agent-android/pull/398)
107154

108155
### Step 4: Delete the asciidoc warning
109156

0 commit comments

Comments
 (0)