Skip to content

Federated Metadata Catalogue API Specification v1.0 #189

Federated Metadata Catalogue API Specification v1.0

Federated Metadata Catalogue API Specification v1.0 #189

name: generate-markdown
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
generate-markdown:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Convert Dataset Yaml to JSON
run: ruby -ryaml -rjson -e 'puts JSON.pretty_generate(YAML.load(ARGF))' < schema/dataset/latest/dataset.schema.yaml > schema/dataset/latest/dataset.schema.json
- name: Set up NodeJS
uses: actions/setup-node@v1
with:
node-version: '13.x'
# Run Spectral on latest schemas
- uses: stoplightio/spectral-action@v0.5.5
with:
file_glob: 'schema/*/latest/*.yaml'
- name: Install jsonschema2md package
run: npm install -g @adobe/jsonschema2md
- name: Run jsonschema2md package to generate markdown
run: jsonschema2md -n -d schema/dataset/latest -o docs/dataset/latest -x -
- name: Auto-Commit generate-markdown
uses: stefanzweifel/git-auto-commit-action@v4.1.6
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
with:
commit_message: Commit generated markdown
branch: ${{ github.head_ref }}
commit_user_name: Susheel Varma
commit_user_email: susheel.varma@hdruk.ac.uk
commit_author: Susheel Varma <susheel.varma@hdruk.ac.uk>