Merge branch 'main' into release #130
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: Deploy Release | |
on: | |
push: | |
branches: | |
- release | |
jobs: | |
deploy_release: | |
name: build | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: yarn | |
- name: install dependency npm | |
run: yarn | |
- name: build release env dist file | |
run: PROXY=prod yarn build | |
- name: upload dist to bj | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.FE_S3_OPEN_STATIC_PROD_BJ_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.FE_S3_OPEN_STATIC_PROD_BJ_ACCESS_KEY_SECRET }} | |
run: | | |
aws --region=${{ vars.PROD_BJ_AWS_DEFAULT_REGION }} s3 sync ./out s3://${{ vars.FE_S3_OPEN_STATIC_PROD_BJ_BUCKET }}/open-longbridge-cloud/ --exclude "*.map" | |
aws --region=${{ vars.PROD_BJ_AWS_DEFAULT_REGION }} s3 sync ./out/zh-HK/ s3://${{ vars.FE_S3_OPEN_STATIC_PROD_BJ_BUCKET }}/open-longbridge-cloud/ --cache-control no-cache | |
aws --region=${{ vars.PROD_BJ_AWS_DEFAULT_REGION }} s3 cp ./out/en.html s3://${{ vars.FE_S3_OPEN_STATIC_PROD_BJ_BUCKET }}/open-longbridge-cloud/en/index.html --cache-control no-cache | |
aws --region=${{ vars.PROD_BJ_AWS_DEFAULT_REGION }} s3 cp ./out/zh-CN.html s3://${{ vars.FE_S3_OPEN_STATIC_PROD_BJ_BUCKET }}/open-longbridge-cloud/zh-CN/index.html --cache-control no-cache | |
aws --region=${{ vars.PROD_BJ_AWS_DEFAULT_REGION }} s3 cp ./out/zh-HK.html s3://${{ vars.FE_S3_OPEN_STATIC_PROD_BJ_BUCKET }}/open-longbridge-cloud/zh-HK/index.html --cache-control no-cache | |
# cd ./out | |
# for file in **/*/*.html; do aws --region=${{ secrets.PROD_BJ_AWS_DEFAULT_REGION }} s3 cp ${file} s3://${{ secrets.FE_S3_OPEN_STATIC_PROD_BJ_BUCKET }}/open-longbridge-cloud/${file} --cache-control no-cache; done; | |
# for file in **/*.html; do aws --region=${{ secrets.PROD_HK_AWS_DEFAULT_REGION }} s3 cp ${file} s3://${{ secrets.FE_S3_OPEN_STATIC_PROD_HK_BUCKET }}/open-longbridge-cloud/${file} --cache-control no-cache; done; | |
- name: upload dist to hk | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.FE_S3_OPEN_STATIC_PROD_HK_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.FE_S3_OPEN_STATIC_PROD_HK_ACCESS_KEY_SECRET }} | |
run: | | |
aws --region=${{ vars.PROD_HK_AWS_DEFAULT_REGION }} s3 sync ./out s3://${{ vars.FE_S3_OPEN_STATIC_PROD_HK_BUCKET }}/open-longbridge-cloud/ --exclude "*.map" | |
aws --region=${{ vars.PROD_HK_AWS_DEFAULT_REGION }} s3 sync ./out/zh-HK/ s3://${{ vars.FE_S3_OPEN_STATIC_PROD_HK_BUCKET }}/open-longbridge-cloud/ --cache-control no-cache | |
aws --region=${{ vars.PROD_HK_AWS_DEFAULT_REGION }} s3 cp ./out/en.html s3://${{ vars.FE_S3_OPEN_STATIC_PROD_HK_BUCKET }}/open-longbridge-cloud/en/index.html --cache-control no-cache | |
aws --region=${{ vars.PROD_HK_AWS_DEFAULT_REGION }} s3 cp ./out/zh-CN.html s3://${{ vars.FE_S3_OPEN_STATIC_PROD_HK_BUCKET }}/open-longbridge-cloud/zh-CN/index.html --cache-control no-cache | |
aws --region=${{ vars.PROD_HK_AWS_DEFAULT_REGION }} s3 cp ./out/zh-HK.html s3://${{ vars.FE_S3_OPEN_STATIC_PROD_HK_BUCKET }}/open-longbridge-cloud/zh-HK/index.html --cache-control no-cache | |
# cd ./out | |
# for file in **/*/*.html; do aws --region=${{ secrets.PROD_HK_AWS_DEFAULT_REGION }} s3 cp ${file} s3://${{ secrets.FE_S3_OPEN_STATIC_PROD_HK_BUCKET }}/open-longbridge-cloud/${file} --cache-control no-cache; done; | |
# for file in **/*.html; do aws --region=${{ secrets.PROD_HK_AWS_DEFAULT_REGION }} s3 cp ${file} s3://${{ secrets.FE_S3_OPEN_STATIC_PROD_HK_BUCKET }}/open-longbridge-cloud/${file} --cache-control no-cache; done; |