mirror of
https://github.com/longbridge/developers.git
synced 2026-09-19 03:34:09 +08:00
47 lines
2.5 KiB
YAML
47 lines
2.5 KiB
YAML
name: Deploy Release
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 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: yarn build:release
|
|
|
|
- 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=${{ secrets.PROD_BJ_AWS_DEFAULT_REGION }} s3 sync ./dist s3://${{ secrets.FE_S3_OPEN_STATIC_PROD_BJ_BUCKET }}/openapi-website/ --exclude "*.map" --cache-control max-age=31536000
|
|
aws --region=${{ secrets.PROD_BJ_AWS_DEFAULT_REGION }} s3 cp ./dist/docs/index.html s3://${{ secrets.FE_S3_OPEN_STATIC_PROD_BJ_BUCKET }}/openapi-website/ --cache-control no-cache
|
|
aws --region=${{ secrets.PROD_BJ_AWS_DEFAULT_REGION }} s3 cp ./dist/en/docs/index.html s3://${{ secrets.FE_S3_OPEN_STATIC_PROD_BJ_BUCKET }}/openapi-website/en/ --cache-control no-cache
|
|
aws --region=${{ secrets.PROD_BJ_AWS_DEFAULT_REGION }} s3 cp ./dist/zh-HK/docs/index.html s3://${{ secrets.FE_S3_OPEN_STATIC_PROD_BJ_BUCKET }}/openapi-website/zh-HK/ --cache-control no-cache
|
|
|
|
- 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=${{ secrets.PROD_HK_AWS_DEFAULT_REGION }} s3 sync ./dist s3://${{ secrets.FE_S3_OPEN_STATIC_PROD_HK_BUCKET }}/openapi-website/ --exclude "*.map" --cache-control max-age=31536000
|
|
aws --region=${{ secrets.PROD_HK_AWS_DEFAULT_REGION }} s3 cp ./dist/docs/index.html s3://${{ secrets.FE_S3_OPEN_STATIC_PROD_HK_BUCKET }}/openapi-website/ --cache-control no-cache
|
|
aws --region=${{ secrets.PROD_HK_AWS_DEFAULT_REGION }} s3 cp ./dist/en/docs/index.html s3://${{ secrets.FE_S3_OPEN_STATIC_PROD_HK_BUCKET }}/openapi-website/en/ --cache-control no-cache
|
|
aws --region=${{ secrets.PROD_HK_AWS_DEFAULT_REGION }} s3 cp ./dist/zh-HK/docs/index.html s3://${{ secrets.FE_S3_OPEN_STATIC_PROD_HK_BUCKET }}/openapi-website/zh-HK/ --cache-control no-cache
|