Skip to content

Commit 1800765

Browse files
build: Run customized Antora for PRs
1 parent 53900cc commit 1800765

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

.github/workflows/antora-build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Antora Documentation Build
2+
3+
on:
4+
# create: # new branches or tags
5+
release: # new releases
6+
pull_request:
7+
branches: [ main ]
8+
push: # on push. This may be removed later
9+
# schedule: # periodic - needed because some of the content is from the other repos
10+
# - cron: '30 5,20 * * *' # this is pretty often. Only needed during review phase
11+
12+
jobs:
13+
antora-build:
14+
name: Build
15+
runs-on: ubuntu-20.04
16+
17+
services:
18+
kroki:
19+
image: yuzutech/kroki:0.15.1
20+
env:
21+
KROKI_MAX_URI_LENGTH: 8000
22+
KROKI_BLOCKDIAG_HOST: blockdiag
23+
KROKI_MERMAID_HOST: mermaid
24+
blockdiag:
25+
image: yuzutech/kroki-blockdiag:0.15.1
26+
mermaid:
27+
image: yuzutech/kroki-mermaid:0.15.1
28+
29+
steps:
30+
- name: Checkout generator
31+
uses: actions/checkout@master
32+
with:
33+
repository: OpenSimulationInterface/osi-antora-generator
34+
path: generator
35+
submodules: true
36+
fetch-depth: 0
37+
38+
- name: Modify site.yml
39+
working-directory: generator
40+
run: |
41+
sed -i -E "s/(branches\:) \[antora\/base-antora-setup\] \# osi-documentation/\1 [HEAD]/" site.yml
42+
43+
- name: Generate site
44+
uses: docker://ghcr.io/asam-ev/project-guide-docker:4
45+
with:
46+
entrypoint: sh
47+
args: generator/run-build.sh
48+
49+
- name: Upload artifact
50+
uses: actions/upload-artifact@v3
51+
with:
52+
name: antora-build
53+
path: ./generator/site
54+
55+

0 commit comments

Comments
 (0)