Skip to content

Commit 194a54b

Browse files
committed
Fix
1 parent bd58fdb commit 194a54b

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/codex-build.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Codex Build
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
environment:
7+
description: The environment to build the codex for
8+
required: false
9+
default: "dev"
10+
type: string
11+
12+
jobs:
13+
build:
14+
permissions:
15+
contents: read
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v6
20+
- name: Setup docs-builder
21+
uses: elastic/docs-actions/docs-builder/setup@main
22+
- name: Build
23+
run: docs-builder --output ./.artifacts/docs/html
24+
- name: Upload docs
25+
uses: actions/upload-artifact@v6
26+
with:
27+
name: docs
28+
path: .artifacts/docs/html
29+
- name: Upload artifact
30+
uses: actions/upload-artifact@v6
31+
with:
32+
name: links
33+
path: .artifacts/docs/html/links.json
34+
35+
preview:
36+
needs: build
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Download artifact
40+
uses: actions/download-artifact@v6
41+
with:
42+
name: docs
43+
path: .
44+
45+
update-link-index:
46+
concurrency:
47+
group: codex-upload-link-index
48+
needs: build
49+
permissions:
50+
id-token: write
51+
if: github.ref == 'refs/heads/main'
52+
uses: elastic/docs-actions/codex/update-link-index@main
53+
with:
54+
environment: ${{ inputs.environment }}

0 commit comments

Comments
 (0)