Release by 29.05.2024 (#1222) #325
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
name: Build theme-builder | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
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/ |