-
Notifications
You must be signed in to change notification settings - Fork 28
66 lines (56 loc) · 1.84 KB
/
generate-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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Update API Reference
on:
workflow_dispatch:
workflow_call:
secrets:
DOCKER_GIT_TOKEN:
required: true
jobs:
generate_api_reference:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- name: Install packages
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Generate Store API Reference
working-directory: ./packages/hms-video-store
run: yarn docs
- name: Generate React SDK API Reference
working-directory: ./packages/react-sdk
run: yarn docs
- name: checkout 100ms-docs
uses: actions/checkout@v4
with:
token: ${{ secrets.DOCKER_GIT_TOKEN }}
repository: 100mslive/100ms-docs
path: 100ms-docs
- name: copy over api reference
run: |
mkdir -p ./100ms-docs/docs/api-reference/javascript/react
cp -R ./packages/hms-video-store/docs ./100ms-docs/docs/api-reference/javascript
cp -R ./packages/react-sdk/docs ./100ms-docs/docs/api-reference/javascript/react
- name: replace old api-reference
working-directory: ./100ms-docs/docs/api-reference/javascript
run: |
rm -r v2
mv docs v2
mv react/docs v2/react-hooks
- name: Create PR
uses: peter-evans/create-pull-request@v7
with:
path: 100ms-docs
token: ${{ secrets.DOCKER_GIT_TOKEN }}
commit-message: 'docs(web): update api reference'
title: 'docs(web): update api reference'
labels: automated pr
branch: web-api-reference
base: main
delete-branch: true