-
Notifications
You must be signed in to change notification settings - Fork 16
49 lines (39 loc) · 1.17 KB
/
compile_docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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 }}