Skip to content

Commit 977a741

Browse files
committed
Add codex-build workflow
1 parent c095115 commit 977a741

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

workflows/codex-build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
11+
jobs:
12+
build:
13+
permissions:
14+
contents: read
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v6
19+
- name: Setup docs-builder
20+
uses: elastic/docs-actions/docs-builder/setup@main
21+
- name: Build
22+
run: docs-builder --output ./.artifacts/docs/html
23+
- name: Upload docs
24+
uses: actions/upload-artifact@v6
25+
with:
26+
name: docs
27+
path: .artifacts/docs/html
28+
- name: Upload artifact
29+
uses: actions/upload-artifact@v6
30+
with:
31+
name: links
32+
path: .artifacts/docs/html/links.json
33+
34+
preview:
35+
needs: build
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Download artifact
39+
uses: actions/download-artifact@v6
40+
with:
41+
name: docs
42+
path: .
43+
44+
update-link-index:
45+
concurrency:
46+
group: codex-upload-link-index
47+
needs: build
48+
permissions:
49+
id-token: write
50+
if: github.ref == 'refs/heads/main'
51+
uses: elastic/docs-actions/codex/update-link-index@main

0 commit comments

Comments
 (0)