-
Notifications
You must be signed in to change notification settings - Fork 19
132 lines (120 loc) · 5.96 KB
/
python-app-fc.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
# This workflow will use OxygenScript to build features.
name: Awesome OxygenScript for DITA doc building (FC)
on:
#push:
# branches: [ master, 'release/**' ]
# branches: [ master ]
pull_request:
# branches: [ 'release/rtc/3.6.2-all' ]
branches: [ 'release/flexible-classroom/2.7.0' ]
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 documentation for FC EN Android"
echo "-----------------------------------------------------------------------------------------------"
echo "-----------------------------------------------------------------------------------------------"
./transform.sh -i ../../../en-US/dita/flexible-classroom/edu-context/Edu_Context_API_Android.ditamap -sn "DITA Map HTML5 - Flexible-EN-Android" -s ../../../.github/workflows/fcr-en-transformation.scenarios -v
echo "Start building documentation for FC CN Android"
echo "-----------------------------------------------------------------------------------------------"
echo "-----------------------------------------------------------------------------------------------"
./transform.sh -i ../../../dita/flexible-classroom/edu-context/Edu_Context_API_Android.ditamap -sn "DITA Map HTML5 - Flexible-CN-Android" -s ../../../.github/workflows/fcr-cn-transformation.scenarios -v
echo "Start building documentation for FC EN iOS"
echo "-----------------------------------------------------------------------------------------------"
echo "-----------------------------------------------------------------------------------------------"
./transform.sh -i ../../../en-US/dita/flexible-classroom/edu-context/Edu_Context_API_iOS.ditamap -sn "DITA Map HTML5 - Flexible-EN-iOS" -s ../../../.github/workflows/fcr-en-transformation.scenarios -v
echo "Start building documentation for FC CN iOS"
echo "-----------------------------------------------------------------------------------------------"
echo "-----------------------------------------------------------------------------------------------"
./transform.sh -i ../../../dita/flexible-classroom/edu-context/Edu_Context_API_iOS.ditamap -sn "DITA Map HTML5 - Flexible-CN-iOS" -s ../../../.github/workflows/fcr-cn-transformation.scenarios -v
- name: zip EN files
run: |
cd en-US/dita/flexible-classroom/edu-context/out
ls
zip -qq -r fc-android-en-doc.zip "android-html5"
ls
zip -qq -r fc-ios-en-doc.zip "ios-html5"
- name: zip CN files
run: |
cd dita/flexible-classroom/edu-context/out
ls
zip -qq -r fc-android-cn-doc.zip "android-html5-cn"
ls
zip -qq -r fc-ios-cn-doc.zip "ios-html5-cn"
- name: Upload FC EN Android doc Artifact
uses: actions/upload-artifact@v3
with:
name: fc-android-en-doc.zip
path: en-US/dita/flexible-classroom/edu-context/out/fc-android-en-doc.zip
- name: Upload FC EN iOS doc Artifact
uses: actions/upload-artifact@v3
with:
path: en-US/dita/flexible-classroom/edu-context/out/fc-ios-en-doc.zip
name: fc-ios-en-doc.zip
- name: Upload FC CN Android doc Artifact
uses: actions/upload-artifact@v3
with:
path: dita/flexible-classroom/edu-context/out/fc-android-cn-doc.zip
name: fc-android-cn-doc.zip
- name: Upload FC CN iOS doc Artifact
uses: actions/upload-artifact@v3
with:
path: dita/flexible-classroom/edu-context/out/fc-ios-cn-doc.zip
name: fc-ios-cn-doc.zip
- name: Upload FC EN Android 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/flexible-classroom/edu-context/out/fc-android-en-doc.zip
asset_name: fc-android-en-doc.zip
tag: ${{ steps.branch-name.outputs.current_branch }}-build
make_latest: false
overwrite: true
body: "DITA docs."
- name: Upload FC EN iOS 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/flexible-classroom/edu-context/out/fc-ios-en-doc.zip
asset_name: fc-ios-en-doc.zip
tag: ${{ steps.branch-name.outputs.current_branch }}-build
make_latest: false
overwrite: true
body: "DITA docs."
- name: Upload FC CN Android doc to release
if: github.ref_name == github.event.repository.default_branch
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dita/flexible-classroom/edu-context/out/fc-android-cn-doc.zip
asset_name: fc-android-cn-doc.zip
tag: ${{ steps.branch-name.outputs.current_branch }}-build
make_latest: false
overwrite: true
body: "DITA docs."
- name: Upload FC CN iOS doc to release
if: github.ref_name == github.event.repository.default_branch
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dita/flexible-classroom/edu-context/out/fc-ios-cn-doc.zip
asset_name: fc-ios-cn-doc.zip
tag: ${{ steps.branch-name.outputs.current_branch }}-build
make_latest: false
overwrite: true
body: "DITA docs."