From 35026a6db4d74eb231b22656877468ebfb86c538 Mon Sep 17 00:00:00 2001 From: sa03 <303914098@qq.com> Date: Wed, 19 Jun 2024 18:34:32 +0800 Subject: [PATCH 1/3] chore(workflow): pull request jobs --- .github/workflows/pull-request.yml | 71 ++++++++++++++++-------------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 99a281a..dd368a9 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,39 +1,44 @@ name: MAIN_PULL_REQUEST on: - push: - branches: [main] - pull_request_target: - types: [closed] + # push: + # branches: [main] + # pull_request_target: + # types: [closed] + pull_request: + branches: [develop, main, compositionAPI] + types: [opened, synchronize, reopened] jobs: - modify-services: - runs-on: ubuntu-latest - outputs: - services-changed: ${{ steps.services-changed.outputs.changed }} - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 100 - - uses: marceloprado/has-changed-path@v1 - id: services-changed - with: - paths: services - - run: echo services changed=${{ steps.services-changed.outputs.changed }} + call-test-build: + uses: Tencent/tdesign/.github/workflows/test-build.yml@main + # modify-services: + # runs-on: ubuntu-latest + # outputs: + # services-changed: ${{ steps.services-changed.outputs.changed }} + # steps: + # - uses: actions/checkout@v2 + # with: + # fetch-depth: 100 + # - uses: marceloprado/has-changed-path@v1 + # id: services-changed + # with: + # paths: services + # - run: echo services changed=${{ steps.services-changed.outputs.changed }} - upload-services: - runs-on: ubuntu-latest - needs: modify-services - if: needs.modify-services.outputs.services-changed == 'true' - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 18 - - run: node ./services/update-components-notice.js - - run: sleep 3s - - run: | - export DEPLOY_DOMAIN=https://tdesign-site-services.surge.sh - npx surge --project ./services --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }} - echo the preview URL is $DEPLOY_DOMAIN - echo "::set-output name=url::$DEPLOY_DOMAIN" + # upload-services: + # runs-on: ubuntu-latest + # needs: modify-services + # if: needs.modify-services.outputs.services-changed == 'true' + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-node@v2 + # with: + # node-version: 18 + # - run: node ./services/update-components-notice.js + # - run: sleep 3s + # - run: | + # export DEPLOY_DOMAIN=https://tdesign-site-services.surge.sh + # npx surge --project ./services --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }} + # echo the preview URL is $DEPLOY_DOMAIN + # echo "::set-output name=url::$DEPLOY_DOMAIN" From 31bd3060bd5a60f7b73849c564bb0bb95075fce8 Mon Sep 17 00:00:00 2001 From: sa03 <303914098@qq.com> Date: Wed, 19 Jun 2024 18:51:09 +0800 Subject: [PATCH 2/3] chore(workflow): temporarily disable --- .github/workflows/test-build.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index facdd50..c804c36 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -39,13 +39,13 @@ jobs: ${{ runner.os }}-build- ${{ runner.os }}- - run: npm install - - run: npm run lint - - run: npm run test + - run: npm run build + # - run: npm run test # upload report to codecov - - uses: codecov/codecov-action@v2 - with: - token: ${{ secrets.CODECOV_TOKEN }} + # - uses: codecov/codecov-action@v2 + # with: + # token: ${{ secrets.CODECOV_TOKEN }} site: runs-on: ubuntu-latest @@ -68,7 +68,6 @@ jobs: ${{ runner.os }}-build- ${{ runner.os }}- - run: npm install - - name: Build site run: npm run site:preview From 54da0695255fa2cf716cf2b499139c11dc63c6b7 Mon Sep 17 00:00:00 2001 From: sa03 <303914098@qq.com> Date: Wed, 19 Jun 2024 18:56:10 +0800 Subject: [PATCH 3/3] chore(workflow): change yml path --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index dd368a9..4486d59 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -11,7 +11,7 @@ on: jobs: call-test-build: - uses: Tencent/tdesign/.github/workflows/test-build.yml@main + uses: .github/workflows/test-build.yml # modify-services: # runs-on: ubuntu-latest # outputs: