Skip to content

Commit 0f109dc

Browse files
committed
Fix unintended merge changes
1 parent 745486b commit 0f109dc

File tree

8 files changed

+41
-22
lines changed

8 files changed

+41
-22
lines changed

.github/workflows/preview-build.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,21 +133,23 @@ jobs:
133133
- name: Build documentation
134134
if: github.repository != 'elastic/docs-builder' && (steps.deployment.outputs.result || (steps.check-files.outputs.any_modified == 'true' && github.event_name == 'merge_group'))
135135
uses: elastic/docs-builder@main
136+
id: docs-build
136137
continue-on-error: ${{ fromJSON(inputs.continue-on-error != '' && inputs.continue-on-error || 'false') }}
137138
with:
138139
prefix: ${{ env.PATH_PREFIX }}
139140
strict: ${{ fromJSON(inputs.strict != '' && inputs.strict || 'true') }}
140141

141142
- name: 'Validate Inbound Links'
143+
if: ${{ !cancelled() && steps.docs-build.outputs.skip != 'true' && (steps.deployment.outputs.result || (steps.check-files.outputs.any_modified == 'true' && github.event_name == 'merge_group')) }}
142144
uses: elastic/docs-builder/actions/validate-inbound-local@main
143-
if: ${{ !cancelled() && (steps.deployment.outputs.result || (steps.check-files.outputs.any_modified == 'true' && github.event_name == 'merge_group')) }}
145+
continue-on-error: true
144146

145147
- uses: elastic/docs-builder/.github/actions/aws-auth@main
146-
if: ${{ !cancelled() && steps.deployment.outputs.result }}
148+
if: ${{ !cancelled() && steps.docs-build.outputs.skip != 'true' && steps.deployment.outputs.result }}
147149

148150
- name: Upload to S3
149151
id: s3-upload
150-
if: ${{ !cancelled() && steps.deployment.outputs.result }}
152+
if: ${{ !cancelled() && steps.docs-build.outputs.skip != 'true' && steps.deployment.outputs.result }}
151153
run: |
152154
aws s3 sync .artifacts/docs/html "s3://elastic-docs-v3-website-preview${PATH_PREFIX}" --delete
153155
aws cloudfront create-invalidation \
@@ -158,6 +160,10 @@ jobs:
158160
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.s3-upload.outcome == 'success'
159161
uses: elastic/docs-builder/actions/update-link-index@main
160162

163+
- name: Update Reference Index
164+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.s3-upload.outcome == 'success'
165+
uses: elastic/docs-builder/actions/update-reference-index@main
166+
161167
- name: Update deployment status
162168
uses: actions/github-script@v7
163169
if: always() && steps.deployment.outputs.result
@@ -169,7 +175,7 @@ jobs:
169175
owner: context.repo.owner,
170176
repo: context.repo.repo,
171177
deployment_id: ${{ steps.deployment.outputs.result }},
172-
state: "${{ steps.s3-upload.outcome == 'success' && 'success' || 'failure' }}",
178+
state: "${{ steps.docs-build.outputs.skip == 'true' && 'inactive' || (steps.s3-upload.outcome == 'success' && 'success' || 'failure') }}",
173179
environment_url: `https://docs-v3-preview.elastic.dev${process.env.PATH_PREFIX}`,
174180
log_url: `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
175181
})

.github/workflows/preview-cleanup.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,6 @@ jobs:
5151
PR_NUMBER: ${{ github.event.pull_request.number }}
5252
run: |
5353
aws s3 rm "s3://elastic-docs-v3-website-preview/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}" --recursive
54+
55+
- name: 'Update Reference Index'
56+
uses: elastic/docs-builder/actions/update-reference-index@main

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ inputs:
1212
strict:
1313
description: 'Treat warnings as errors'
1414
required: false
15+
outputs:
16+
skip:
17+
description: "hint from the documentation tool to skip the docs build for this PR"
1518

1619
runs:
1720
using: 'docker'

actions/generator/action.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: 'Update Reference Index'
2+
description: 'Updates links-index.json with the latest pointers to all links.json files'
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Update Reference Index
8+
run: |
9+
curl -v https://kaqcb6pumme57zlb63wmoqcjxq0fhkdl.lambda-url.us-east-1.on.aws
10+
shell: bash

docs-builder.sln

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "validate-inbound-local", "v
6060
actions\validate-inbound-local\action.yml = actions\validate-inbound-local\action.yml
6161
EndProjectSection
6262
EndProject
63+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "update-link-index", "update-link-index", "{6554F917-73CE-4B3D-9101-F28EAA762C6B}"
64+
ProjectSection(SolutionItems) = preProject
65+
actions\update-link-index\action.yml = actions\update-link-index\action.yml
66+
actions\update-link-index\README.md = actions\update-link-index\README.md
67+
EndProjectSection
68+
EndProject
69+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "update-reference-index", "update-reference-index", "{9FEC15F6-13F8-40B1-A66A-EB054E49E680}"
70+
ProjectSection(SolutionItems) = preProject
71+
actions\update-reference-index\action.yml = actions\update-reference-index\action.yml
72+
EndProjectSection
73+
EndProject
6374
Global
6475
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6576
Debug|Any CPU = Debug|Any CPU
@@ -119,5 +130,7 @@ Global
119130
{CFEE9FAD-9E0C-4C0E-A0C2-B97D594C14B5} = {245023D2-D3CA-47B9-831D-DAB91A2FFDC7}
120131
{4CCE599A-B9FE-4DF2-8763-34CF0A99D4AA} = {BE6011CC-1200-4957-B01F-FCCA10C5CF5A}
121132
{6E2ED6CC-AFC1-4E58-965D-6AEC500EBB46} = {245023D2-D3CA-47B9-831D-DAB91A2FFDC7}
133+
{6554F917-73CE-4B3D-9101-F28EAA762C6B} = {245023D2-D3CA-47B9-831D-DAB91A2FFDC7}
134+
{9FEC15F6-13F8-40B1-A66A-EB054E49E680} = {245023D2-D3CA-47B9-831D-DAB91A2FFDC7}
122135
EndGlobalSection
123136
EndGlobal

src/Elastic.Markdown/Assets/styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
}
173173

174174
#pages-nav .current {
175-
@apply text-blue-elastic!;
175+
@apply font-semibold text-blue-elastic!;
176176
}
177177

178178
.markdown-content {

src/Elastic.Markdown/IO/Navigation/DocumentationGroup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public DocumentationGroup(
5656
IDictionary<string, DocumentationFile> lookup,
5757
IDictionary<string, DocumentationFile[]> folderLookup,
5858
ref int fileIndex,
59-
int depth = -1,
59+
int depth = 0,
6060
MarkdownFile? index = null)
6161
{
6262
Depth = depth;

0 commit comments

Comments
 (0)