Merge pull request #136 from open-component-model/mpas-section #134
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |