Skip to content

Commit

Permalink
Add actions for triggering the external build.
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Ralf <[email protected]>
  • Loading branch information
nakohdo committed Sep 2, 2024
1 parent 41ee96d commit 4cc56a2
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# This is a minimal working Antora configuration
# Source: https://docs.antora.org/antora/latest/publish-to-github-pages/ - Example 2
name: Antora test
# Minimal working Antora configuration to publish to GitHub Pages
# Source: https://docs.antora.org/antora/latest/publish-to-github-pages/ (example 2)
# Output URL: https://asam-ev.github.io/OpenMATERIAL
name: Publish with Antora to GitHub Pages (basic)
on:
push:
branches: [antora-test, main]
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/antora-build-full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Full Antora documentation build
# Based on OSI configuration https://github.com/OpenSimulationInterface/osi-documentation/blob/master/.github/workflows/antora-build.yml
on:
push:
branches: [ main, antora-test ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
trigger_antora:
name: Trigger OpenMATERIAL Antora generator

runs-on: Ubuntu-latest

env:
MUP_KEY: ${{ secrets.ANTORA_DISPATCH }}

steps:
- name: Trigger generator
if: ${{ env.MUP_KEY != '' }}
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ANTORA_DISPATCH }}
event-type: antora-build-trigger
repository: asam-ev/openmaterial-antora-generator
client-payload: '{"src": "${{ github.repository }}", "ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "head_ref": "${{ github.head_ref }}"}'

31 changes: 31 additions & 0 deletions .github/workflows/validate-json.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Validate JSON schema files
# Source: https://github.com/nhalstead/validate-json-action
# Forked from: https://github.com/marketplace/actions/validate-json
name: Validate JSON schemas for assets and materials

on:
pull_request:
paths:
- 'examples/**'
- 'schemas/**'

jobs:
json-schema-validation:
name: JSON schema validation
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Validate "asset" JSON schemas
uses: nhalstead/[email protected]
with:
schema: ./schemas/asset_schema.json
jsons: ./examples/*.xoma

- name: Validate "material" JSON schemas
uses: nhalstead/[email protected]
with:
schema: ./schemas/material_schema.json
jsons: ./examples/*.xomp

0 comments on commit 4cc56a2

Please sign in to comment.