-
Notifications
You must be signed in to change notification settings - Fork 37
37 lines (32 loc) · 1.18 KB
/
markdown-from-json.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
name: markdown-from-json
on: [push]
jobs:
auto-update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Order objects by a given property from a json file
uses: aloisdg/order-by-json@v0.3
with:
pattern: './data/*.json'
property: 'Abbreviation'
- name: setup git config
run: |
if [ $(git diff | wc -l) -gt 0 ]; then
git config user.name "d-edge automation"
git config user.email "<>"
git add ./data/*.json
git commit -m "Order JSON"
git push origin main
else
echo Order is respected
fi
- name: Markdown autodocs
uses: dineshsonachalam/markdown-autodocs@v1.0.3
with:
# Optional output file paths, defaults to '[./README.md]'.
output_file_paths: '[./README.md]'
# Categories to automatically sync or transform its contents in the markdown files.
# Defaults to '[code-block,json-to-html-table,workflow-artifact-table]'
categories: 'json-to-html-table'