Skip to content

Commit 1687fcf

Browse files
authored
Merge pull request #58 from OpenSimulationInterface/build/master-branch-naming
Build/master branch naming
2 parents 90be55c + c663af8 commit 1687fcf

4 files changed

Lines changed: 65 additions & 48 deletions

File tree

.antora/antora.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ title: ASAM OSI
55
version:
66
# Update version number accordingly. This is the version for the main branch
77
main: 'current'
8+
master: 'current'
89
v(*)-antora: V$1
910
v(*): V$1
1011
V(*): V$1
@@ -40,6 +41,8 @@ asciidoc: # Sets global AsciiDoc attributes that are applied for every page of t
4041
# doxygen_document_date: "01.01.2000" # The date associated with the document (optional)
4142
doxygen_module: "gen" # The module in which the output is stored
4243
# doxygen_module_path: "gen" # Path within module
44+
doxygen_source_repo: "https://github.com/OpenSimulationInterface/open-simulation-interface.git"
45+
# doxygen_source_folder: open-simulation-interface
4346

4447
nav:
4548
- modules/specification/nav_introduction.adoc

.github/workflows/antora-build.yml

Lines changed: 60 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,73 @@
11
name: Antora Documentation Build
22

33
on:
4-
# create: # new branches or tags
5-
# release: # new releases
64
push:
7-
branches-ignore: [ main, master ]
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
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
118

129
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
10+
trigger_antora:
11+
name: Trigger antora generator
12+
13+
runs-on: Ubuntu-latest
14+
15+
env:
16+
MUP_KEY: ${{ secrets.MACHINE_USER_PAT }}
2817

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

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
61+
# - name: Generate site
62+
# uses: docker://ghcr.io/asam-ev/project-guide-docker:4
63+
# with:
64+
# entrypoint: sh
65+
# args: generator/run-build.sh
5266

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

59-
73+

.github/workflows/asciidoc-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
asciidoctor-build:
1414
name: Run Asciidoctor on Documentation
1515

16-
runs-on: ubuntu-18.04
16+
runs-on: ubuntu-22.04
1717

1818
steps:
1919
# Checkout osi documentation

asciidoc-resources

Submodule asciidoc-resources updated from 65d2501 to 4baff8c

0 commit comments

Comments
 (0)