Browse Source

chore: publish bundle analyzer report to surge.sh (#42251)

pull/42260/head
afc163 2 years ago
committed by GitHub
parent
commit
fe13c2b9b1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      .github/workflows/site-deploy.yml

12
.github/workflows/site-deploy.yml

@ -63,9 +63,14 @@ jobs:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
- name: build - name: build site
run: npm run predeploy run: npm run predeploy
- name: build dist and bundle analyzer report
run: npm run dist
with:
CI: false
- name: Get version - name: Get version
id: publish-version id: publish-version
run: echo "VERSION=$(echo ${{ github.ref_name }} | sed 's/\./-/g')" >> $GITHUB_OUTPUT run: echo "VERSION=$(echo ${{ github.ref_name }} | sed 's/\./-/g')" >> $GITHUB_OUTPUT
@ -80,10 +85,13 @@ jobs:
- name: Deploy to Surge (with TAG) - name: Deploy to Surge (with TAG)
run: | run: |
export DEPLOY_DOMAIN=ant-design-${{ steps.publish-version.outputs.VERSION }}.surge.sh 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 }} npx surge --project ./_site --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }}
- name: Create Commit Comment - name: Create Commit Comment
uses: peter-evans/commit-comment@v2 uses: peter-evans/commit-comment@v2
with: with:
body: | 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

Loading…
Cancel
Save