This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch chore-workflow
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit 72dd9d351a2cd6167b32362295ccaa48e4d8bc06
Author: plainheart <[email protected]>
AuthorDate: Mon Mar 30 14:35:39 2026 +0800

    chore(workflow): remove pr preview actions [skip ci]
---
 .github/workflows/ci.yml                  | 32 -------------
 .github/workflows/pr-preview.yml          | 78 -------------------------------
 .github/workflows/teardown-pr-preview.yml | 33 -------------
 3 files changed, 143 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c52edcd6f..516d9f493 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -91,35 +91,3 @@ jobs:
 
       - name: Test generated DTS
         run: npm run test:dts
-
-      - name: Pack npm tarball
-        if: ${{ github.repository_owner == 'apache' }}
-        id: pack-tarball
-        run: |
-          export PR_PREVIEW_DIR='echarts-pr-preview'
-          mkdir -p $PR_PREVIEW_DIR
-          npm pack --pack-destination $PR_PREVIEW_DIR
-          echo "PR_PREVIEW_DIR=$PR_PREVIEW_DIR" >> $GITHUB_ENV
-
-      - name: Save PR metadata and dist files
-        if: ${{ steps.pack-tarball.outcome == 'success' }}
-        id: save-pr-data
-        env:
-          PR_NUMBER: ${{ github.event.number }}
-          PR_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
-          PR_PREVIEW_DIR: ${{ env.PR_PREVIEW_DIR }}
-        run: |
-          cd $PR_PREVIEW_DIR
-          echo $PR_NUMBER > ./pr_number
-          echo $PR_COMMIT_SHA > ./pr_commit_sha
-          find . -type f -regex ".*\.tgz" -exec tar xvzf {} \;
-          rm -f *.tgz
-          echo -e "Dist files: \n$(ls -l)"
-
-      - uses: actions/upload-artifact@v6
-        if: ${{ steps.save-pr-data.outcome == 'success' }}
-        with:
-          name: pr_preview
-          path: ${{ env.PR_PREVIEW_DIR }}
-          retention-days: 1
-          if-no-files-found: error
diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml
deleted file mode 100644
index 4f8b6f3e9..000000000
--- a/.github/workflows/pr-preview.yml
+++ /dev/null
@@ -1,78 +0,0 @@
-name: Deploy PR Preview
-
-on:
-  workflow_run:
-    workflows: ['Node CI']
-    types: [completed]
-
-jobs:
-  on-success:
-    if: ${{ github.repository_owner == 'apache' }}
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: Determine if workflow build job is successful
-        id: check-build-success
-        uses: actions/github-script@v8
-        with:
-          result-encoding: string
-          script: |
-            const jobsRes = await github.rest.actions.listJobsForWorkflowRun({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              run_id: context.payload.workflow_run.id
-            });
-            return jobsRes.data.jobs.some((job) => job.name.includes('build') 
&& job.conclusion === 'success');
-
-    outputs:
-      SHOULD_DEPLOY: ${{ steps.check-build-success.outputs.result }}
-
-  deploy:
-    needs: [on-success]
-    if: ${{ needs.on-success.outputs.SHOULD_DEPLOY == 'true' }}
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: Install action dependencies
-        run: |
-          mkdir .actions
-          cd .actions
-          git clone --depth=1 
https://github.com/dawidd6/action-download-artifact.git
-          git clone --depth=1 
https://github.com/plainheart/maintain-one-comment.git
-
-      - name: Fetch PR dist files
-        uses: ./.actions/action-download-artifact
-        with:
-          workflow: ${{ github.event.workflow.id }}
-          run_id: ${{ github.event.workflow_run.id }}
-          name: pr_preview
-          path: pr-dist
-          if_no_artifact_found: fail
-
-      - name: Output PR metadata
-        id: pr-metadata
-        working-directory: pr-dist
-        run: |
-          echo "NUMBER=$(cat pr_number)" >> $GITHUB_OUTPUT
-          echo "COMMIT_SHA=$(cat pr_commit_sha)" >> $GITHUB_OUTPUT
-          echo "COMMIT_SHA_SHORT=$(cat pr_commit_sha | cut -c 1-7)" >> 
$GITHUB_OUTPUT
-
-      - name: Deploy dist files
-        env:
-          PR_NUMBER: ${{ steps.pr-metadata.outputs.NUMBER }}
-          SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
-        working-directory: pr-dist
-        run: |
-          export SURGE_DOMAIN=https://echarts-pr-$PR_NUMBER.surge.sh
-          npx surge --project ./package --domain $SURGE_DOMAIN --token 
$SURGE_TOKEN
-
-      - name: Create comment for PR preview
-        uses: ./.actions/maintain-one-comment
-        env:
-          PR_NUMBER: ${{ steps.pr-metadata.outputs.NUMBER }}
-          COMMIT_SHA_SHORT: ${{ steps.pr-metadata.outputs.COMMIT_SHA_SHORT }}
-        with:
-          body: |
-            The changes brought by this PR can be previewed at: 
https://echarts.apache.org/examples/editor?version=PR-${{ env.PR_NUMBER }}@${{ 
env.COMMIT_SHA_SHORT }}
-          body-include: '<!-- ECHARTS_PR_PREVIEW -->'
-          number: ${{ env.PR_NUMBER }}
diff --git a/.github/workflows/teardown-pr-preview.yml 
b/.github/workflows/teardown-pr-preview.yml
deleted file mode 100644
index bd919255b..000000000
--- a/.github/workflows/teardown-pr-preview.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-name: Teardown PR Preview
-
-on:
-  pull_request_target:
-    types: [closed]
-
-jobs:
-  teardown-pr-preview:
-    if: ${{ github.repository_owner == 'apache' && github.event.action == 
'closed' && github.event.pull_request.merged != true }}
-    concurrency:
-      # to cancel running `ci` workflows in current PR
-      group: 'Node CI-${{ github.event.number }}'
-      cancel-in-progress: true
-    runs-on: ubuntu-latest
-    steps:
-      - name: Install action dependencies
-        run: git clone --depth=1 
https://github.com/plainheart/maintain-one-comment.git
-
-      - name: Delete PR preview comment
-        uses: ./maintain-one-comment
-        with:
-          body-include: '<!-- ECHARTS_PR_PREVIEW -->'
-          delete: true
-          number: ${{ github.event.number }}
-
-      - name: Teardown closed PR preview
-        continue-on-error: true
-        run: |
-          export SURGE_DOMAIN='https://echarts-pr-${{ github.event.number 
}}.surge.sh'
-          npx surge teardown $SURGE_DOMAIN --token ${SURGE_TOKEN}
-
-        env:
-          SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to