Merge pull request #3797 from AgoraIO/4.4.1-harmony #3704
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will use OxygenScript to build features. | |
name: Awesome OxygenScript for DITA doc building (CG SDK) | |
on: | |
push: | |
# branches: [ master, 'release/**' ] | |
branches: [ master ] | |
pull_request: | |
# branches: [ 'release/rtc/3.6.2-all' ] | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: montudor/action-zip@v1 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8.0.332+9' | |
distribution: 'temurin' | |
- name: Get branch name | |
id: branch-name | |
uses: tj-actions/branch-names@v7 | |
- name: DITA doc building | |
run: | | |
cd scripts/oxygen/scripts | |
echo "Start building documentation for CSharp CN" | |
echo "-----------------------------------------------------------------------------------------------" | |
echo "-----------------------------------------------------------------------------------------------" | |
./transform.sh -i ../../../dita/RTC/RTC_API_CS.ditamap -sn "DITA Map HTML5 - CG CSharp" -s ../../../.github/workflows/exported_scenarios.scenarios -v | |
echo "Start building documentation for Flutter CN" | |
echo "-----------------------------------------------------------------------------------------------" | |
echo "-----------------------------------------------------------------------------------------------" | |
./transform.sh -i ../../../dita/RTC/RTC_API_Flutter.ditamap -sn "DITA Map HTML5 - CG Flutter" -s ../../../.github/workflows/exported_scenarios.scenarios -v | |
echo "Start building documentation for CSharp EN" | |
echo "-----------------------------------------------------------------------------------------------" | |
echo "-----------------------------------------------------------------------------------------------" | |
./transform.sh -i ../../../en-US/dita/RTC/RTC_API_CS.ditamap -sn "DITA Map HTML5 - CG CSharp" -s ../../../.github/workflows/exported_scenarios_en.scenarios -v | |
echo "Start building documentation for Flutter EN" | |
echo "-----------------------------------------------------------------------------------------------" | |
echo "-----------------------------------------------------------------------------------------------" | |
./transform.sh -i ../../../en-US/dita/RTC/RTC_API_Flutter.ditamap -sn "DITA Map HTML5 - CG Flutter" -s ../../../.github/workflows/exported_scenarios_en.scenarios -v | |
- name: zip files | |
run: | | |
cd dita/RTC/out | |
zip -qq -r flutter_cg_cn_doc.zip "flutter_cg" | |
ls | |
zip -qq -r cs_cg_cn_doc.zip "csharp_cg" | |
cd ../../../en-US/dita/RTC/out | |
ls | |
zip -qq -r flutter_cg_en_doc.zip "flutter_cg_en" | |
ls | |
zip -qq -r cs_cg_en_doc.zip "csharp_cg_en" | |
ls | |
- name: Upload Flutter CG CN doc Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: dita/RTC/out/flutter_cg_cn_doc.zip | |
name: flutter_cg_cn_doc.zip | |
- name: Upload CSharp CG CN doc Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: dita/RTC/out/cs_cg_cn_doc.zip | |
name: cs_cg_cn_doc.zip | |
- name: Upload Flutter CG EN doc Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: en-US/dita/RTC/out/flutter_cg_en_doc.zip | |
name: flutter_cg_en_doc.zip | |
- name: Upload CSharp CG EN doc Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: en-US/dita/RTC/out/cs_cg_en_doc.zip | |
name: cs_cg_en_doc.zip | |
- name: Upload Flutter CG CN doc Artifact | |
if: github.ref_name == github.event.repository.default_branch | |
uses: svenstaro/[email protected] | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: dita/RTC/out/flutter_cg_cn_doc.zip | |
asset_name: flutter_cg_cn_doc.zip | |
tag: ${{ steps.branch-name.outputs.current_branch }}-build | |
make_latest: false | |
overwrite: true | |
body: "DITA docs." | |
- name: Upload CSharp CG 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/out/cs_cg_cn_doc.zip | |
asset_name: cs_cg_cn_doc.zip | |
tag: ${{ steps.branch-name.outputs.current_branch }}-build | |
make_latest: false | |
overwrite: true | |
body: "DITA docs." | |
- name: Upload Flutter CG 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/out/flutter_cg_en_doc.zip | |
asset_name: flutter_cg_en_doc.zip | |
tag: ${{ steps.branch-name.outputs.current_branch }}-build | |
make_latest: false | |
overwrite: true | |
body: "DITA docs." | |
- name: Upload CSharp CG 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/out/cs_cg_en_doc.zip | |
asset_name: cs_cg_en_doc.zip | |
tag: ${{ steps.branch-name.outputs.current_branch }}-build | |
make_latest: false | |
overwrite: true | |
body: "DITA docs." | |