Skip to content

Commit be1bd18

Browse files
authored
Update versioning docs with deployment models and CI details (#1303)
* Update versioning docs with deployment models and CI details Clarified content sources, deployment models (continuous and tagged), and their configurations in the versioning documentation. Added instructions for CI setup and repository onboarding, providing guidance for smoother integration and timing control of documentation deployment. * update headings * update definition lists * fix header
1 parent d775e9f commit be1bd18

File tree

3 files changed

+116
-5
lines changed

3 files changed

+116
-5
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ on:
2828
push:
2929
branches:
3030
- main <1>
31+
- '\d+.\d+' <2>
3132
pull_request_target: ~
3233

3334
jobs:
3435
docs-preview:
35-
uses: elastic/docs-builder/.github/workflows/preview-build.yml <2>
36+
uses: elastic/docs-builder/.github/workflows/preview-build.yml <3>
3637
with:
37-
path-pattern: docs/** <3>
38+
path-pattern: docs/** <4>
3839
permissions:
3940
id-token: write
4041
deployments: write
@@ -43,8 +44,9 @@ jobs:
4344
```
4445
4546
1. You need to adjust this to your default branch. E.g `main`, `master`, etc.
46-
2. Reusable workflow: [elastic/docs-builder/.github/workflows/preview-build.yml](https://github.com/elastic/docs-builder/blob/main/.github/workflows/preview-build.yml)
47-
3. This should be the path to your docs folder.
47+
2. Optional, a match for the branch you wish to publish to production if different from the first.
48+
3. Reusable workflow: [elastic/docs-builder/.github/workflows/preview-build.yml](https://github.com/elastic/docs-builder/blob/main/.github/workflows/preview-build.yml)
49+
4. This should be the path to your `docs` folder.
4850

4951
:::
5052

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ on:
115115
push:
116116
branches:
117117
- main
118+
- '\d+.\d+' <1>
118119
pull_request_target: ~
119120
merge_group: ~
120121

@@ -130,6 +131,8 @@ jobs:
130131
pull-requests: read
131132
```
132133
134+
1. Optional match for version branches if you do not wish to publish to production from `main`.
135+
133136
Learn more about this file: [`docs-build.yml`](./how-to-set-up-docs-previews.md#build).
134137

135138
:::{important}

docs/migration/versioning.md

Lines changed: 107 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,110 @@ To ensure a seamless experience for users and contributors, the new versioning a
77
* Context awareness — Each page explicitly states the context it applies to, including relevant deployment types (e.g., Elastic Cloud Hosted and Elastic Cloud Serverless) and versions. Context clarity ensures users know if the content is applicable to their environment. When users land on a Docs page that doesn’t apply to their version or deployment type, clear cues and instructions will guide them to the appropriate content.
88
* Simplified contributor workflow — For pages that apply to multiple versions or deployment types, we’ve optimized the contributor experience by reducing complexity. Contributors can now manage multi-context content with ease, without duplicating information or navigating confusing workflows.
99

10-
For versioning plan details, check [Docs Versioning plan](https://docs.google.com/presentation/d/1rHl0ia0ZkLHPLAYE5522CTDoatqwAxwAo29_etStPW8/edit?usp=sharing). To learn how to call out versioning differences in docs-builder, see [product availability](../syntax/applies.md).
10+
For versioning plan details, check [Docs Versioning plan](https://docs.google.com/presentation/d/1rHl0ia0ZkLHPLAYE5522CTDoatqwAxwAo29_etStPW8/edit?usp=sharing). To learn how to call out versioning differences in docs-builder, see [product availability](../syntax/applies.md).
11+
12+
13+
## Content Sources
14+
15+
To support multiple deployment models for different repositories, we support the concept of a content source.
16+
17+
Next
18+
: The source for the upcoming documentation.
19+
20+
Current
21+
: The source for the active documentation.
22+
23+
24+
Our publish environments are connected to a single content source.
25+
26+
| Publish Environment | Content Source |
27+
|---------------------|----------------|
28+
| Production | `Current` |
29+
| Staging | `Current` |
30+
| Edge | `Next` |
31+
32+
This allows you as an owner of a repository to choose two different deployment models.
33+
34+
## Deployment models.
35+
36+
The new documentation system supports 2 deployment models.
37+
38+
Continuous deployment.
39+
: This is the default where a repositories `main` or `master` branch is continuously deployed to production.
40+
41+
Tagged deployment
42+
: Allows you to 'tag' a single git reference (typically a branch) as `current` which will be used to deploy to production.
43+
Allowing you to control the timing of when new documentation should go live.
44+
45+
46+
### Continuous Deployment
47+
48+
This is the default. To get started, follow our [guide](guide/index.md) to set up the new docs folder structure and CI configuration
49+
50+
Once setup ensure the repository is added to our `assembler.yml` under `references`.
51+
52+
For example say you want to onboard `elastic/my-repository` into the production build:
53+
54+
```yaml
55+
references:
56+
my-repository:
57+
```
58+
59+
Is equivalent to specifying.
60+
61+
```yaml
62+
references:
63+
my-repository:
64+
next: main
65+
current: main
66+
```
67+
68+
% TODO we need navigation.yml docs
69+
Once the repository is added, its navigation still needs to be injected into to global site navigation.
70+
71+
### Tagged Deployment
72+
73+
If you want to have more control over the timing of when your docs go live to production. Configure the repository
74+
in our `assembler.yml` to have a fixed git reference (typically a branch) deploy the `current` content source to production.
75+
76+
```yaml
77+
references:
78+
my-other-repository:
79+
next: main
80+
current: 9.0
81+
```
82+
83+
:::{note}
84+
In order for `9.0` to be onboarded it needs to first follow our [migration guide](guide/index.md) and have our documentation CI integration setup.
85+
Our CI integration checks will block until `current` is successfully configured
86+
:::
87+
88+
#### CI Configuration
89+
90+
To ensure [tagged deployments](#tagged-deployment) can be onboarded correctly, our CI integration needs to have appropriate `push`
91+
branch triggers.
92+
93+
```yml
94+
name: docs-build
95+
96+
on:
97+
push:
98+
branches:
99+
- main
100+
- '\d+.\d+' <1>
101+
pull_request_target: ~
102+
merge_group: ~
103+
104+
jobs:
105+
docs-preview:
106+
uses: elastic/docs-builder/.github/workflows/preview-build.yml@main
107+
with:
108+
path-pattern: docs/**
109+
permissions:
110+
deployments: write
111+
id-token: write
112+
contents: read
113+
pull-requests: read
114+
```
115+
116+
1. Ensure version branches are built and publish their links ahead of time.

0 commit comments

Comments
 (0)