-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (43 loc) · 1.34 KB
/
documentation-generator.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
50
51
52
53
54
55
name: Documentation Generator
on:
workflow_dispatch:
repository_dispatch:
types: [data-models-update]
push:
branches: [ master ]
jobs:
documentation-generator:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout master branch
uses: actions/checkout@v2
- name: Identify
run: |
git config user.name OpenActive Bot
git config user.email [email protected]
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Erase existing docs except README.md
run: find ./docs/data-model/types -type f -maxdepth 1 ! -name README.md -delete
- run: npm install
working-directory: generator
- name: Update data models
run: |
npm install @openactive/data-models@latest
npm ls @openactive/data-models
working-directory: generator
- name: Generate data model documentation
run: npm start
working-directory: generator
- name: Commit generated files
run: |
git add docs/data-model/types/
git add docs/SUMMARY.md
git status
git commit --message "Updating auto-generated model documentation [ci skip]" || echo "No changes to commit"
- name: Push generated files
run: git push