Compile Documentation to Markdown #53
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: Compile Documentation to Markdown | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'schema/**' | |
- '.github/workflows/compile_docs.yml' | |
workflow_dispatch: | |
jobs: | |
compile: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Copy schema | |
run: cp ./schema/iea43_wra_data_model.schema.json ./app/src/schema.json | |
- name: Setup Node | |
uses: actions/setup-node@v2-beta | |
with: | |
node-version: '12' | |
- name: Install jsonschema2md | |
run: npm install -g @adobe/jsonschema2md | |
- name: Clear docs folder | |
run: rm -rf docs | |
- name: Compile docs to Markdown | |
run: jsonschema2md -d schema -o docs -h false | |
- name: Commit files | |
continue-on-error: true | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add docs | |
git commit -m "Compile documentation" | |
- name: Push changes | |
continue-on-error: true | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |