From fe13c2b9b1326aaf71106d985bc5174b98694b35 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 10 May 2023 15:14:45 +0800 Subject: [PATCH] chore: publish bundle analyzer report to surge.sh (#42251) --- .github/workflows/site-deploy.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/site-deploy.yml b/.github/workflows/site-deploy.yml index 26ef591998..a661278d2f 100644 --- a/.github/workflows/site-deploy.yml +++ b/.github/workflows/site-deploy.yml @@ -63,9 +63,14 @@ jobs: path: node_modules key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - name: build + - name: build site run: npm run predeploy + - name: build dist and bundle analyzer report + run: npm run dist + with: + CI: false + - name: Get version id: publish-version run: echo "VERSION=$(echo ${{ github.ref_name }} | sed 's/\./-/g')" >> $GITHUB_OUTPUT @@ -80,10 +85,13 @@ jobs: - name: Deploy to Surge (with TAG) run: | export DEPLOY_DOMAIN=ant-design-${{ steps.publish-version.outputs.VERSION }}.surge.sh + cp report.html ./_site npx surge --project ./_site --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }} - name: Create Commit Comment uses: peter-evans/commit-comment@v2 with: body: | - Doc site for this release: https://ant-design-${{ steps.publish-version.outputs.VERSION }}.surge.sh + - Documentation site for this release: https://ant-design-${{ steps.publish-version.outputs.VERSION }}.surge.sh + - Webpack bundle analyzer report page: https://ant-design-${{ steps.publish-version.outputs.VERSION }}.surge.sh/report.html +