Skip to content

Commit 33bf94f

Browse files
authored
Merge branch 'main' into copilot/fix-9fd41bee-6e6b-4d48-96d5-a333ec92fe14
2 parents 5c144b9 + 918b97e commit 33bf94f

File tree

225 files changed

+11053
-3366
lines changed

Some content is hidden

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

225 files changed

+11053
-3366
lines changed

.github/actions/aws-auth/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ runs:
3737
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
3838
f.write(f"result=arn:aws:iam::{os.environ["AWS_ACCOUNT_ID"]}:role/{prefix}{hash}")
3939
- name: Configure AWS Credentials
40-
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0
40+
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0
4141
with:
4242
role-to-assume: ${{ steps.role_arn.outputs.result }}
4343
aws-region: ${{ inputs.aws_region }}

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,38 @@ jobs:
3737

3838
build-api-lambda:
3939
uses: ./.github/workflows/build-api-lambda.yml
40+
4041

42+
synthetics:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v5
46+
47+
- name: Bootstrap Action Workspace
48+
id: bootstrap
49+
uses: ./.github/actions/bootstrap
50+
51+
- name: Install dependencies
52+
working-directory: src/Elastic.Documentation.Site
53+
run: npm ci
54+
55+
- name: Run assembler
56+
run: |
57+
mkdir ../assembler-workspace
58+
cd ../assembler-workspace
59+
dotnet run --project ../docs-builder/src/tooling/docs-builder -- assembler config init --local
60+
dotnet run --project ../docs-builder/src/tooling/docs-builder -- assembler clone -c local --skip-private-repositories
61+
dotnet run --project ../docs-builder/src/tooling/docs-builder -- assembler build -c local --skip-private-repositories
62+
dotnet run --project ../docs-builder/src/tooling/docs-builder -- assembler serve &
63+
64+
- name: Wait for docs
65+
working-directory: src/Elastic.Documentation.Site
66+
run: npx wait-on http-get://localhost:4000/docs
67+
68+
- name: Run synthetics
69+
working-directory: src/Elastic.Documentation.Site
70+
run: npm run synthetics:test
71+
4172
npm:
4273
runs-on: ubuntu-latest
4374
defaults:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
run: |
4646
zip -j "${ZIP_FILE}" ./bootstrap
4747
48-
- uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0
48+
- uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0
4949
with:
5050
role-to-assume: arn:aws:iam::197730964718:role/elastic-docs-v3-api-deployer-${{ inputs.environment }}
5151
aws-region: us-east-1

.github/workflows/detect-duplicate-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Detect potential duplicate issues
19-
uses: actions/github-script@v7
19+
uses: actions/github-script@v8
2020
with:
2121
script: |
2222
const { owner, repo } = context.repo;

.github/workflows/preview-build.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ jobs:
334334
# we run our artifact directly, please use the prebuild
335335
# elastic/docs-builder@main GitHub Action for all other repositories!
336336
- name: Build documentation
337+
id: internal-docs-build
337338
if: >
338339
env.MATCH == 'true'
339340
&& github.repository == 'elastic/docs-builder'
@@ -385,7 +386,7 @@ jobs:
385386
&& (
386387
!cancelled()
387388
&& github.repository == 'elastic/docs-builder'
388-
&& steps.docs-build.outputs.skip != 'true'
389+
&& steps.internal-docs-build.outputs.skip != 'true'
389390
&& (
390391
steps.deployment.outputs.result
391392
|| (
@@ -404,6 +405,7 @@ jobs:
404405
!cancelled()
405406
&& github.repository != 'elastic/docs-builder'
406407
&& steps.docs-build.outputs.skip != 'true'
408+
&& steps.docs-build.outcome != 'skipped'
407409
&& (
408410
steps.deployment.outputs.result
409411
|| (
@@ -420,7 +422,8 @@ jobs:
420422
&& (
421423
!cancelled()
422424
&& github.repository == 'elastic/docs-builder'
423-
&& steps.docs-build.outputs.skip != 'true'
425+
&& steps.internal-docs-build.outputs.skip != 'true'
426+
&& steps.internal-docs-build.outcome != 'skipped'
424427
&& (
425428
steps.deployment.outputs.result
426429
|| (
@@ -435,15 +438,17 @@ jobs:
435438
- uses: elastic/docs-builder/.github/actions/aws-auth@main
436439
if: >
437440
!cancelled()
438-
&& steps.docs-build.outputs.skip != 'true'
441+
&& (steps.docs-build.outputs.skip != 'true' || steps.internal-docs-build.outputs.skip != 'true')
439442
&& steps.deployment.outputs.result
443+
&& (steps.docs-build.outcome == 'success' || steps.internal-docs-build.outcome == 'success')
440444
- name: Upload to S3
441445
id: s3-upload
442446
if: >
443447
env.MATCH == 'true'
444448
&& !cancelled()
445-
&& steps.docs-build.outputs.skip != 'true'
449+
&& (steps.docs-build.outputs.skip != 'true' || steps.internal-docs-build.outputs.skip != 'true')
446450
&& steps.deployment.outputs.result
451+
&& (steps.docs-build.outcome == 'success' || steps.internal-docs-build.outcome == 'success')
447452
run: |
448453
aws s3 sync .artifacts/docs/html "s3://elastic-docs-v3-website-preview${PATH_PREFIX}" --delete --no-follow-symlinks
449454
aws cloudfront create-invalidation \
@@ -518,15 +523,15 @@ jobs:
518523
return;
519524
}
520525
521-
const toLink = (file) => {
526+
const toMarkdownLink = (file) => {
522527
const path = file
523-
.replace('docs/', '')
524-
.replace('/index.md', '')
525-
.replace('.md', '');
528+
.replace(/^docs\//, '')
529+
.replace(/\/index.md$/, '')
530+
.replace(/\.md$/, '');
526531
return `[${file}](https://docs-v3-preview.elastic.dev${process.env.PATH_PREFIX}/${path})`;
527532
}
528533
529-
const links = changedMdFiles.map(toLink)
534+
const links = changedMdFiles.map(toMarkdownLink)
530535
531536
const body = [
532537
title,

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
run: |
111111
zip -j "${ZIP_FILE}" ./bootstrap
112112
113-
- uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0
113+
- uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0
114114
with:
115115
role-to-assume: arn:aws:iam::197730964718:role/elastic-docs-v3-link-index-updater-deployer
116116
aws-region: us-east-2

.github/workflows/required-labels.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v5
22+
- name: Wait for PR to be ready (if just opened)
23+
if: github.event_name == 'pull_request_target' && github.event.action == 'opened'
24+
run: sleep 30
2225
- id: get-labels
2326
run: |
2427
labels=$(yq '[.categories[].labels] + .exclude-labels | flatten | unique | sort | @tsv' .github/release-drafter.yml | tr '\t' ',')

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,3 +397,6 @@ FodyWeavers.xsd
397397

398398
# JetBrains Rider
399399
*.sln.iml
400+
401+
# Elastic synthetics
402+
.synthetics/

actions/update-link-index/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ runs:
4242
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
4343
f.write(f"result=arn:aws:iam::{aws_account_id}:role/{prefix}{hash}")
4444
- name: Configure AWS Credentials
45-
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0
45+
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0
4646
with:
4747
role-to-assume: ${{ steps.role_arn.outputs.result }}
4848
aws-region: us-east-1

build/Targets.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ let private runTests (testSuite: TestSuite) _ =
134134
let testFilter =
135135
match testSuite with
136136
| All -> []
137-
| Unit -> ["--filter"; "FullyQualifiedName~.Tests"]
137+
| Unit -> ["--filter"; "FullyQualifiedName~.Tests|FullyQualifiedName~AuthoringTests"]
138138
| Integration -> ["--filter"; "FullyQualifiedName~.IntegrationTests"]
139139

140140
exec {

0 commit comments

Comments
 (0)