File tree 3 files changed +48
-0
lines changed
3 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Docs
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ workflow_dispatch :
8
+
9
+ jobs :
10
+ docs :
11
+ name : Publish docs / OS ${{ matrix.os }} / Node ${{ matrix.node }}
12
+ strategy :
13
+ matrix :
14
+ os :
15
+ - ubuntu-latest
16
+ node :
17
+ - ' 12'
18
+
19
+ runs-on : ${{ matrix.os }}
20
+
21
+ steps :
22
+ - uses : actions/checkout@v2
23
+
24
+ - uses : actions/setup-node@v2
25
+ with :
26
+ node-version : ${{ matrix.node }}
27
+
28
+ - run : |
29
+ npm ci
30
+ npm run docs:export
31
+
32
+ - name : Generate Swagger UI
33
+ uses : Legion2/swagger-ui-action@v1
34
+ with :
35
+ output : docs
36
+ spec-file : openapi.json
37
+
38
+ - name : Publish
39
+ uses : peaceiris/actions-gh-pages@v3
40
+ with :
41
+ github_token : ${{ secrets.GITHUB_TOKEN }}
42
+ publish_dir : docs
43
+ force_orphan : true
44
+ commit_message : ' docs: update'
Original file line number Diff line number Diff line change @@ -108,3 +108,6 @@ dist/
108
108
109
109
# Binaries
110
110
bin /
111
+
112
+ # postgres-meta
113
+ openapi.json
Original file line number Diff line number Diff line change 19
19
"build:main" : " tsc -p tsconfig.json && cpy 'src/lib/sql/*.sql' dist/main/sql" ,
20
20
"build:module" : " tsc -p tsconfig.module.json && cpy 'src/lib/sql/*.sql' dist/module/sql" ,
21
21
"build:server" : " tsc -p tsconfig.server.json && cpy 'src/lib/sql/*.sql' bin/src/lib/sql" ,
22
+ "docs:export" : " PG_META_EXPORT_DOCS=true ts-node-dev src/server/app.ts" ,
22
23
"start" : " ts-node-dev src/server/app.ts | pino-pretty --colorize" ,
23
24
"dev" : " run-s clean format start" ,
24
25
"pkg" : " run-s clean format build:server && pkg --out-path bin .pkg.config.json" ,
You can’t perform that action at this time.
0 commit comments