forked from hashgraph/guardian
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (70 loc) · 2.01 KB
/
add-documentation-to-repo.yaml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Generate Documentation
on:
workflow_dispatch:
description: 'Manual run'
push:
branches-ignore:
- 'dependabot/**'
- 'main'
jobs:
runService:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20.x ]
mongodb-version: [ 7.0.5 ]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Start NatsMQ
uses: onichandame/nats-action@master
with:
port: "4222"
- name: Config Repo
run: |
git config --global user.name "envision-ci-agent"
git config --global user.email "[email protected]"
git remote set-url origin https://x-access-token:${{ secrets.DOC_UPDATE_API_KEY }}@github.com/$GITHUB_REPOSITORY
git checkout "${GITHUB_REF:11}"
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Build
run: |
yarn
pushd interfaces
yarn run build
popd
pushd common
yarn run build
popd
pushd api-gateway
yarn run build
popd
pushd analytics-service
yarn run build
popd
env:
CI: true
- name: Run service
run: |
pushd api-gateway
yarn start &
popd
pushd analytics-service
yarn start &
popd
sleep 30
- name: Download file
run: |
rm -fv swagger.yaml
rm -fv swagger-analytics.yaml
curl -o swagger.yaml http://localhost:3002/api-docs-yaml
curl -o swagger-analytics.yaml http://localhost:3020/api-docs-yaml
git add swagger.yaml
git add swagger-analytics.yaml
git commit -m "[skip ci] Add swagger.yaml" && git push || exit 0