-
Notifications
You must be signed in to change notification settings - Fork 19
207 lines (198 loc) · 11.3 KB
/
NG-SDK-Framework-Doc-Building.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# This workflow will use OxygenScript to build features.
name: (NG SDK Frameworks)Awesome OxygenScript for DITA doc building
on:
push:
# branches: [ master, 'release/**' ]
branches: ["release/rtc-ng/4.1.0"]
pull_request:
# branches: [ master, 'release/**' ]
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: montudor/action-zip@v1
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v7
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: "8.0.332+9"
distribution: "temurin"
- name: DITA doc building
run: |
cd scripts/oxygen/scripts
echo "Start building docs for Flutter CN"
echo "-----------------------------------------------------------------------------------------------"
echo "-----------------------------------------------------------------------------------------------"
./transform.sh -i ../../../dita/RTC-NG/RTC_NG_API_Flutter.ditamap -sn "DITA Map HTML5 - NG Flutter" -s ../../../.github/workflows/NG-Flutter-cn.scenarios -v
echo "Start building docs for RN CN"
echo "-----------------------------------------------------------------------------------------------"
echo "-----------------------------------------------------------------------------------------------"
./transform.sh -i ../../../dita/RTC-NG/RTC_NG_API_RN.ditamap -sn "DITA Map HTML5 - NG RN" -s ../../../.github/workflows/NG-RN-cn.scenarios -v
echo "Start building docs for Unity CN"
echo "-----------------------------------------------------------------------------------------------"
echo "-----------------------------------------------------------------------------------------------"
./transform.sh -i ../../../dita/RTC-NG/RTC_NG_API_Unity.ditamap -sn "DITA Map HTML5 - NG Unity" -s ../../../.github/workflows/NG-Unity-cn.scenarios -v
echo "Start building docs for Electron CN"
echo "-----------------------------------------------------------------------------------------------"
echo "-----------------------------------------------------------------------------------------------"
./transform.sh -i ../../../dita/RTC-NG/RTC_NG_API_Electron.ditamap -sn "DITA Map HTML5 - NG Electron" -s ../../../.github/workflows/NG-Electron-cn.scenarios -v
echo "Start building docs for Flutter EN"
echo "-----------------------------------------------------------------------------------------------"
echo "-----------------------------------------------------------------------------------------------"
./transform.sh -i ../../../en-US/dita/RTC-NG/RTC_NG_API_Flutter.ditamap -sn "DITA Map HTML5 - NG Flutter" -s ../../../.github/workflows/NG-Flutter-en.scenarios -v
echo "Start building docs for RN EN"
echo "-----------------------------------------------------------------------------------------------"
echo "-----------------------------------------------------------------------------------------------"
./transform.sh -i ../../../en-US/dita/RTC-NG/RTC_NG_API_RN.ditamap -sn "DITA Map HTML5 - NG RN" -s ../../../.github/workflows/NG-RN-en.scenarios -v
echo "Start building docs for Flutter EN"
echo "-----------------------------------------------------------------------------------------------"
echo "-----------------------------------------------------------------------------------------------"
./transform.sh -i ../../../en-US/dita/RTC-NG/RTC_NG_API_Unity.ditamap -sn "DITA Map HTML5 - NG Unity" -s ../../../.github/workflows/NG-Unity-en.scenarios -v
echo "Start building docs for Electron EN"
echo "-----------------------------------------------------------------------------------------------"
echo "-----------------------------------------------------------------------------------------------"
./transform.sh -i ../../../en-US/dita/RTC-NG/RTC_NG_API_Electron.ditamap -sn "DITA Map HTML5 - NG Electron" -s ../../../.github/workflows/NG-Electron-en.scenarios -v
- name: zip files
run: |
cd dita/RTC-NG/out
zip -qq -r flutter_ng_cn_doc.zip "flutter-ng-cn"
zip -qq -r rn_ng_cn_doc.zip "rn-ng-cn"
zip -qq -r unity_ng_cn_doc.zip "unity-ng-cn"
zip -qq -r electron_ng_cn_doc.zip "electron-ng-cn"
cd ../../../en-US/dita/RTC-NG/out
zip -qq -r flutter_ng_en_doc.zip "flutter-ng"
zip -qq -r rn_ng_en_doc.zip "rn-ng"
zip -qq -r unity_ng_en_doc.zip "unity-ng"
zip -qq -r electron_ng_en_doc.zip "electron-ng"
- name: Upload Flutter NG CN doc Artifact
uses: actions/upload-artifact@v3
with:
path: dita/RTC-NG/out/flutter_ng_cn_doc.zip
name: flutter_ng_cn_doc.zip
- name: Upload Flutter NG EN doc Artifact
uses: actions/upload-artifact@v3
with:
path: en-US/dita/RTC-NG/out/flutter_ng_en_doc.zip
name: flutter_ng_en_doc.zip
- name: Upload RN NG CN doc Artifact
uses: actions/upload-artifact@v3
with:
path: dita/RTC-NG/out/rn_ng_cn_doc.zip
name: rn_ng_cn_doc.zip
- name: Upload RN NG EN doc Artifact
uses: actions/upload-artifact@v3
with:
path: en-US/dita/RTC-NG/out/rn_ng_en_doc.zip
name: rn_ng_en_doc.zip
- name: Upload Unity NG CN doc Artifact
uses: actions/upload-artifact@v3
with:
path: dita/RTC-NG/out/unity_ng_cn_doc.zip
name: unity_ng_cn_doc.zip
- name: Upload Unity NG EN doc Artifact
uses: actions/upload-artifact@v3
with:
path: en-US/dita/RTC-NG/out/unity_ng_en_doc.zip
name: unity_ng_en_doc.zip
- name: Upload Electron NG CN doc Artifact
uses: actions/upload-artifact@v3
with:
path: dita/RTC-NG/out/electron_ng_cn_doc.zip
name: electron_ng_cn_doc.zip
- name: Upload Electron NG EN doc Artifact
uses: actions/upload-artifact@v3
with:
path: en-US/dita/RTC-NG/out/electron_ng_en_doc.zip
name: electron_ng_en_doc.zip
- name: Upload Flutter NG CN doc to release
if: github.ref_name == github.event.repository.default_branch
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dita/RTC-NG/out/flutter_ng_cn_doc.zip
asset_name: flutter_ng_cn_doc.zip
tag: ${{ steps.branch-name.outputs.current_branch }}-build
make_latest: false
overwrite: true
body: "DITA docs."
- name: Upload Flutter NG EN doc to release
if: github.ref_name == github.event.repository.default_branch
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: en-US/dita/RTC-NG/out/flutter_ng_en_doc.zip
asset_name: flutter_ng_en_doc.zip
tag: ${{ steps.branch-name.outputs.current_branch }}-build
make_latest: false
overwrite: true
body: "DITA docs."
- name: Upload RN NG CN doc to release
if: github.ref_name == github.event.repository.default_branch
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dita/RTC-NG/out/rn_ng_cn_doc.zip
asset_name: rn_ng_cn_doc.zip
tag: ${{ steps.branch-name.outputs.current_branch }}-build
make_latest: false
overwrite: true
body: "DITA docs."
- name: Upload RN NG EN doc to release
if: github.ref_name == github.event.repository.default_branch
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: en-US/dita/RTC-NG/out/rn_ng_en_doc.zip
asset_name: rn_ng_en_doc.zip
tag: ${{ steps.branch-name.outputs.current_branch }}-build
make_latest: false
overwrite: true
body: "DITA docs."
- name: Upload Unity NG CN doc to release
if: github.ref_name == github.event.repository.default_branch
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dita/RTC-NG/out/unity_ng_cn_doc.zip
asset_name: unity_ng_cn_doc.zip
tag: ${{ steps.branch-name.outputs.current_branch }}-build
make_latest: false
overwrite: true
body: "DITA docs."
- name: Upload Unity NG EN doc to release
if: github.ref_name == github.event.repository.default_branch
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: en-US/dita/RTC-NG/out/unity_ng_en_doc.zip
asset_name: unity_ng_en_doc.zip
tag: ${{ steps.branch-name.outputs.current_branch }}-build
make_latest: false
overwrite: true
body: "DITA docs."
- name: Upload Electron NG CN doc to release
if: github.ref_name == github.event.repository.default_branch
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dita/RTC-NG/out/electron_ng_cn_doc.zip
asset_name: electron_ng_cn_doc.zip
tag: ${{ steps.branch-name.outputs.current_branch }}-build
make_latest: false
overwrite: true
body: "DITA docs."
- name: Upload Electron NG EN doc to release
if: github.ref_name == github.event.repository.default_branch
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: en-US/dita/RTC-NG/out/electron_ng_en_doc.zip
asset_name: electron_ng_en_doc.zip
tag: ${{ steps.branch-name.outputs.current_branch }}-build
make_latest: false
overwrite: true
body: "DITA docs."