-
Notifications
You must be signed in to change notification settings - Fork 20
52 lines (44 loc) · 1.67 KB
/
theme-builder.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
name: Build theme-builder
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/prepare-environment
- name: Prepare directory build
run: mkdir -p s3_build
# TODO: https://github.com/salute-developers/plasma/issues/255
- name: Lerna bootstrap with scope
run: |
npx lerna bootstrap --scope @salutejs/plasma-theme-builder --scope=@salutejs/plasma-{tokens,tokens-utils}
# 2 папки, так как названия разные - в первом случае нужно для replace
- name: Build Theme Builder
env:
REACT_APP_APPLICATION_CLIENT_ID: ${{ secrets.REACT_APP_APPLICATION_CLIENT_ID }}
REACT_APP_AUTH_SERVER_URL: ${{ secrets.REACT_APP_AUTH_SERVER_URL }}
run: |
export NODE_OPTIONS=--openssl-legacy-provider
npm run build --prefix="./website/plasma-theme-builder"
cp -R ./website/plasma-theme-builder/build ./s3_build/plasma-theme-builder-next
- name: Install s3cmd
run: |
pip3 install s3cmd
- name: s3 Upload build
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
--secret_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
--host ${{ secrets.AWS_ENDPOINT }}
--host-bucket ${{ secrets.AWS_ENDPOINT }}
--bucket-location ${{ secrets.AWS_REGION }}
--signature-v2
--delete-removed
--no-mime-magic
sync
./s3_build/plasma-theme-builder-next/
s3://${{ secrets.AWS_S3_BUCKET_2 }}/plasma-theme-builder/