-
Notifications
You must be signed in to change notification settings - Fork 52
98 lines (96 loc) · 2.98 KB
/
ci.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
name: CI Pipeline
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: yarn test
env:
TEST_HEADLESS: true
TEST_HOST_URI: http://localhost:8080
TEST_JWT_TOKEN: ${{ secrets.TEST_JWT_TOKEN }}
TEST_THIRD_PARTY_URI: https://ringcentral-tutorials.github.io/ringcentral-embeddable-demos/
TEST_SMS_RECEIVER_NUMBER: ${{ secrets.TEST_SMS_RECEIVER_NUMBER }}
API_KEY: ${{ secrets.TEST_API_KEY }}
API_SECRET: ${{ secrets.TEST_API_SECRET }}
API_SERVER: ${{ secrets.API_SERVER }}
build:
needs: test
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Use Node.js 20.x
uses: actions/setup-node@v1
with:
node-version: 20.x
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: yarn
- run: yarn build
env:
API_KEY: ${{ secrets.API_KEY }}
API_SERVER: ${{ secrets.API_SERVER }}
HOSTING_URL: ${{ secrets.HOSTING_URL }}
MIXPANEL_KEY: ${{ secrets.MIXPANEL_KEY }}
ANALYTICS_SECRET_KEY: ${{ secrets.ANALYTICS_SECRET_KEY }}
- run: ./build_brand_themes.sh
- run: pip install mkdocs
- run: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- run: mkdocs build
- run: mv site release/docs
- name: Github Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: release
CLEAN: true
extension-build:
needs: test
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Use Node.js 20.x
uses: actions/setup-node@v1
with:
node-version: 20.x
- run: yarn
- run: yarn build-extension
env:
API_KEY: ${{ secrets.API_KEY }}
API_SERVER: ${{ secrets.API_SERVER }}
MIXPANEL_KEY: ${{ secrets.MIXPANEL_KEY }}
ANALYTICS_SECRET_KEY: ${{ secrets.ANALYTICS_SECRET_KEY }}
- run: ./build_brand_themes.sh
- name: Github Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: extension-build
FOLDER: extension
CLEAN: true