Skip to content

Merge pull request #136 from open-component-model/mpas-section #134

Merge pull request #136 from open-component-model/mpas-section

Merge pull request #136 from open-component-model/mpas-section #134

Workflow file for this run

name: Publish Site
on:
workflow_dispatch:
push:
branches: [ main ]
env:
OUTPUT_DIR: site-docs/
jobs:
setup-clone:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest
permissions:
contents: 'write'
id-token: 'write'
pull-requests: 'write'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: 16
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
- run: npm install
- run: npm run build
- name: Generate Schema
uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: |
python3 -m pip install json-schema-for-humans
generate-schema-doc --config-file generate-schema.yaml static/schemas/component-descriptor-v2 schema-v2.html
generate-schema-doc --config-file generate-schema.yaml static/schemas/component-descriptor-v3alpha1 schema-v3alpha1.html
- name: Copy Schema
run: |
cp schema-v2.html schema-v3alpha1.html schema_doc.css schema_doc.min.js public/spec
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public