Skip to content

Commit 143d7f5

Browse files
Exchanged in-workflow build of Antora with
generator repository trigger Signed-off-by: Philip Windecker <philip.windecker@avenyr.de>
1 parent 33ea9b7 commit 143d7f5

1 file changed

Lines changed: 52 additions & 39 deletions

File tree

.github/workflows/antora-build.yml

Lines changed: 52 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -10,50 +10,63 @@ on:
1010
# - cron: '30 5,20 * * *' # this is pretty often. Only needed during review phase
1111

1212
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
13+
trigger_antora:
14+
name: Trigger antora generator
15+
16+
runs-on: Ubuntu-latest
2817

2918
steps:
30-
- name: Checkout generator
31-
uses: actions/checkout@master
19+
- name: Trigger generator
20+
uses: peter-evans/repository-dispatch@v2
3221
with:
22+
token: ${{ secrets.MACHINE_USER_PAT }}
23+
event-type: antora-build-trigger
3324
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-
echo "$GITHUB_REF_NAME"
42-
sed -i -E "s%(branches\:) \[antora\/base-antora-setup\] \# osi-documentation%\1 [$GITHUB_REF_NAME] \# osi-documentation%" site.yml
43-
cat site.yml
44-
sed -i -E "s/cd repo/cd generator/" run-build.sh
45-
cat run-build.sh
25+
client-payload: '{"src": "${{ github.repository }}", "ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
26+
# antora-build:
27+
# name: Build
28+
# runs-on: ubuntu-20.04
29+
30+
# services:
31+
# kroki:
32+
# image: yuzutech/kroki:0.15.1
33+
# env:
34+
# KROKI_MAX_URI_LENGTH: 8000
35+
# KROKI_BLOCKDIAG_HOST: blockdiag
36+
# KROKI_MERMAID_HOST: mermaid
37+
# blockdiag:
38+
# image: yuzutech/kroki-blockdiag:0.15.1
39+
# mermaid:
40+
# image: yuzutech/kroki-mermaid:0.15.1
41+
42+
# steps:
43+
# - name: Checkout generator
44+
# uses: actions/checkout@master
45+
# with:
46+
# repository: OpenSimulationInterface/osi-antora-generator
47+
# path: generator
48+
# submodules: true
49+
# fetch-depth: 0
50+
51+
# - name: Modify site.yml
52+
# working-directory: generator
53+
# run: |
54+
# echo "$GITHUB_REF_NAME"
55+
# sed -i -E "s%(branches\:) \[antora\/base-antora-setup\] \# osi-documentation%\1 [$GITHUB_REF_NAME] \# osi-documentation%" site.yml
56+
# cat site.yml
57+
# sed -i -E "s/cd repo/cd generator/" run-build.sh
58+
# cat run-build.sh
4659

47-
- name: Generate site
48-
uses: docker://ghcr.io/asam-ev/project-guide-docker:4
49-
with:
50-
entrypoint: sh
51-
args: generator/run-build.sh
60+
# - name: Generate site
61+
# uses: docker://ghcr.io/asam-ev/project-guide-docker:4
62+
# with:
63+
# entrypoint: sh
64+
# args: generator/run-build.sh
5265

53-
- name: Upload artifact
54-
uses: actions/upload-artifact@v3
55-
with:
56-
name: antora-build
57-
path: ./generator/site
66+
# - name: Upload artifact
67+
# uses: actions/upload-artifact@v3
68+
# with:
69+
# name: antora-build
70+
# path: ./generator/site
5871

5972

0 commit comments

Comments
 (0)