Skip to content

Commit d597bec

Browse files
committed
Merge branch 'add-deeplink-anchors-dropdown' of github.com:elastic/docs-builder into add-deeplink-anchors-dropdown
2 parents e5dfcf9 + 5a0d5f6 commit d597bec

File tree

135 files changed

+1881
-1663
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+1881
-1663
lines changed

.github/workflows/build-api-lambda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
env:
2222
BINARY_PATH: .artifacts/Elastic.Documentation.Api.Lambda/release_linux-x64/bootstrap
2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v5
2525
with:
2626
ref: ${{ inputs.ref }}
2727
- name: Amazon Linux 2023 build

.github/workflows/build-link-index-updater-lambda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
env:
1919
BINARY_PATH: .artifacts/docs-lambda-index-publisher/release_linux-x64/bootstrap
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v5
2222
with:
2323
ref: ${{ inputs.ref }}
2424
- name: Amazon Linux 2023 build

.github/workflows/ci.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
validate-assembler:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v5
2424

2525
- name: Bootstrap Action Workspace
2626
id: bootstrap
@@ -44,7 +44,7 @@ jobs:
4444
run:
4545
working-directory: src/Elastic.Documentation.Site
4646
steps:
47-
- uses: actions/checkout@v4
47+
- uses: actions/checkout@v5
4848

4949
- uses: actions/setup-node@v4
5050
with:
@@ -78,7 +78,7 @@ jobs:
7878
- macos-latest
7979
- windows-latest
8080
steps:
81-
- uses: actions/checkout@v4
81+
- uses: actions/checkout@v5
8282

8383
- name: Bootstrap Action Workspace
8484
id: bootstrap
@@ -94,12 +94,22 @@ jobs:
9494
run: dotnet run --project build -c release -- unit-test
9595

9696
- name: Publish AOT
97+
if: ${{ matrix.os != 'ubuntu-latest' }} # publish containers already validates AOT build
9798
run: dotnet run --project build -c release -- publishbinaries
99+
100+
- name: Publish Containers
101+
if: ${{ matrix.os == 'ubuntu-latest' }}
102+
run: dotnet run --project build -c release -- publishcontainers
103+
104+
- name: Run Container
105+
if: ${{ matrix.os == 'ubuntu-latest' }}
106+
run: docker run elastic/docs-builder:ci-${{ github.event.pull_request.number }} --help
107+
98108

99109
integration:
100110
runs-on: docs-builder-latest-16
101111
steps:
102-
- uses: actions/checkout@v4
112+
- uses: actions/checkout@v5
103113

104114
- name: Bootstrap Action Workspace
105115
id: bootstrap

.github/workflows/create-major-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
create-major-tag:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919
- name: Get major version
2020
run: |
2121
MAJOR_VERSION=$(echo "${GITHUB_REF#refs/tags/}" | awk -F. '{print $1}')

.github/workflows/deploy-api-lambda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
env:
2525
ZIP_FILE: api-lambda.zip
2626
steps:
27-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v5
2828
- name: Download bootstrap binary
2929
uses: actions/download-artifact@v4
3030
with:

.github/workflows/license.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515

1616
- name: Check license headers
1717
run: |

.github/workflows/prerelease.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
steps:
2727
- id: repo-basename
2828
run: 'echo "value=`basename ${{ github.repository }}`" >> $GITHUB_OUTPUT'
29-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v5
3030
- name: Setup Pages
3131
id: pages
3232
uses: actions/[email protected]
@@ -35,7 +35,7 @@ jobs:
3535
with:
3636
prefix: '${{ steps.repo-basename.outputs.value }}'
3737
- name: Upload artifact
38-
uses: actions/upload-pages-artifact@v3.0.1
38+
uses: actions/upload-pages-artifact@v4.0.0
3939
with:
4040
path: .artifacts/docs/html
4141

@@ -50,7 +50,7 @@ jobs:
5050
major-version: ${{ steps.bootstrap.outputs.major-version }}
5151

5252
steps:
53-
- uses: actions/checkout@v4
53+
- uses: actions/checkout@v5
5454

5555
- name: Bootstrap Action Workspace
5656
id: bootstrap

.github/workflows/preview-build.yml

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ on:
5353
type: boolean
5454
default: false
5555
required: false
56+
enable-cumulative-comment:
57+
description: 'Enable info comment'
58+
type: boolean
59+
default: false
60+
required: false
5661

5762
permissions:
5863
contents: read
@@ -124,7 +129,7 @@ jobs:
124129
steps:
125130
- name: Checkout
126131
if: contains(fromJSON('["push", "merge_group", "workflow_dispatch"]'), github.event_name)
127-
uses: actions/checkout@v4
132+
uses: actions/checkout@v5
128133
with:
129134
ref: ${{ github.event.pull_request.head.sha || github.ref }}
130135

@@ -223,7 +228,7 @@ jobs:
223228
needs.check.outputs.any_modified == 'true'
224229
|| contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name)
225230
)
226-
uses: actions/checkout@v4
231+
uses: actions/checkout@v5
227232
with:
228233
ref: ${{ github.event.pull_request.head.sha || github.ref }}
229234
persist-credentials: false
@@ -463,6 +468,7 @@ jobs:
463468
ALL_CHANGED_FILES: ${{ needs.check.outputs.all_changed_files }}
464469
PATH_PREFIX: ${{ needs.build.outputs.path_prefix }}
465470
with:
471+
# language=javascript
466472
script: |
467473
const title = '## 🔍 Preview links for changed docs'
468474
const changedMdFiles = process.env.ALL_CHANGED_FILES
@@ -530,3 +536,58 @@ jobs:
530536
body:body.join('\n'),
531537
});
532538
}
539+
- name: Comment on docs changes about versioning requirements
540+
if: inputs.enable-cumulative-comment == 'true'
541+
uses: actions/github-script@v7
542+
with:
543+
github-token: ${{ secrets.GITHUB_TOKEN }}
544+
# language=javascript
545+
script: |
546+
const pr = context.payload.pull_request;
547+
const prNum = pr.number;
548+
const owner = context.repo.owner;
549+
const repo = context.repo.repo;
550+
551+
552+
const { data: comments } = await github.rest.issues.listComments({
553+
owner, repo, issue_number: prNum
554+
});
555+
556+
const title = '## ℹ️ Important: Docs version tagging';
557+
558+
const existingComment = comments.find(c =>
559+
c.user.type === 'Bot' &&
560+
c.body.startsWith(title)
561+
);
562+
563+
if (existingComment) return;
564+
565+
const body = `${title}
566+
567+
👋 Thanks for updating the docs! Just a friendly reminder that our docs are now **cumulative**. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version.
568+
569+
We use [applies_to tags](https://elastic.github.io/docs-builder/syntax/applies) to mark version-specific features and changes.
570+
571+
<details>
572+
<summary>Expand for a quick overview</summary>
573+
574+
### When to use applies_to tags:
575+
✅ At the page level to indicate which products/deployments the content applies to (mandatory)
576+
✅ When features change state (e.g. preview, ga) in a specific version
577+
✅ When availability differs across deployments and environments
578+
579+
### What NOT to do:
580+
❌ Don't remove or replace information that applies to an older version
581+
❌ Don't add new information that applies to a specific version without an applies_to tag
582+
❌ Don't forget that applies_to tags can be used at the page, section, and inline level
583+
</details>
584+
585+
### 🤔 Need help?
586+
- Check out the [cumulative docs guidelines](https://elastic.github.io/docs-builder/contribute/cumulative-docs/)
587+
- Reach out in the [#docs](https://elastic.slack.com/archives/C0JF80CJZ) Slack channel`;
588+
589+
await github.rest.issues.createComment({
590+
owner, repo,
591+
issue_number: prNum,
592+
body
593+
});

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
major-version: ${{ steps.bootstrap.outputs.major-version }}
5353

5454
steps:
55-
- uses: actions/checkout@v4
55+
- uses: actions/checkout@v5
5656
with:
5757
ref: ${{ needs.release-drafter.outputs.tag_name }}
5858
- name: Bootstrap Action Workspace
@@ -67,7 +67,7 @@ jobs:
6767
password: ${{ secrets.GITHUB_TOKEN }}
6868

6969
- name: Publish Containers
70-
run: ./build.sh publishcontainers\
70+
run: ./build.sh publishcontainers
7171

7272
build-lambda:
7373
needs:
@@ -133,7 +133,7 @@ jobs:
133133
major-version: ${{ steps.bootstrap.outputs.major-version }}
134134

135135
steps:
136-
- uses: actions/checkout@v4
136+
- uses: actions/checkout@v5
137137
with:
138138
ref: ${{ needs.release-drafter.outputs.tag_name }}
139139

.github/workflows/required-labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
pull-requests: write
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v5
2222
- id: get-labels
2323
run: |
2424
labels=$(yq '[.categories[].labels] + .exclude-labels | flatten | unique | sort | @tsv' .github/release-drafter.yml | tr '\t' ',')

0 commit comments

Comments
 (0)