Skip to content

Commit

Permalink
ci(ci/tdesign-component-repositories-ci): fix preview
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 committed Mar 6, 2025
1 parent 001b9dc commit 772fd06
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions .github/workflows/tdesign-component-repositories-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ jobs:
- if: matrix.script != 'preview'
run: npm run ${{ matrix.script }}

- if: matrix.script == 'preview'
run: npm run site:preview

- if: matrix.script == 'preview'
run: |
npm run site:preview
export DEPLOY_DOMAIN=https://preview-tdesign-vue-pr-${{ needs.pr-context.outputs.pr_id }}-tdesign-common.surge.sh
npx --project _site surge --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
npx surge --project _site --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
tdesign-vue-next:
if: github.event.workflow_run.conclusion == 'success'
Expand Down Expand Up @@ -101,11 +103,13 @@ jobs:
- if: matrix.script != 'preview'
run: pnpm run ${{ matrix.script }}

- if: matrix.script == 'preview'
run: pnpm run site:preview

- if: matrix.script == 'preview'
run: |
pnpm site:preview
export DEPLOY_DOMAIN=https://preview-tdesign-vue-next-pr-${{ needs.pr-context.outputs.pr_id }}-tdesign-common.surge.sh
npx --project packages/tdesign-vue-next/site/dist surge --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
npx surge --project packages/tdesign-vue-next/site/dist --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
tdesign-react:
if: github.event.workflow_run.conclusion == 'success'
Expand Down Expand Up @@ -140,11 +144,13 @@ jobs:
- if: matrix.script != 'preview'
run: npm run ${{ matrix.script }}

- if: matrix.script == 'preview'
run: npm run site:preview

- if: matrix.script == 'preview'
run: |
npm run site:preview
export DEPLOY_DOMAIN=https://preview-tdesign-vue-pr-${{ needs.pr-context.outputs.pr_id }}-tdesign-common.surge.sh
npx --project _site surge --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
npx surge --project _site --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
tdesign-web-components:
if: github.event.workflow_run.conclusion == 'success'
Expand Down Expand Up @@ -179,11 +185,14 @@ jobs:
- if: matrix.script != 'preview'
run: npm run ${{ matrix.script }}

- if: matrix.script == 'preview'
run: npm run site:preview

- if: matrix.script == 'preview'
run: |
npm run site:preview
export DEPLOY_DOMAIN=https://preview-tdesign-web-components-pr-${{ needs.pr-context.outputs.pr_id }}-tdesign-common.surge.sh
npx --project _site surge --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
npx surge --project _site --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
tdesign-mobile-vue:
if: github.event.workflow_run.conclusion == 'success'
Expand Down Expand Up @@ -218,11 +227,13 @@ jobs:
- if: matrix.script != 'preview'
run: npm run ${{ matrix.script }}

- if: matrix.script == 'preview'
run: npm run site:preview

- if: matrix.script == 'preview'
run: |
npm run site:preview
export DEPLOY_DOMAIN=https://preview-tdesign-mobile-vue-pr-${{ needs.pr-context.outputs.pr_id }}-tdesign-common.surge.sh
npx --project _site surge --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
npx surge --project _site --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
tdesign-mobile-react:
if: github.event.workflow_run.conclusion == 'success'
Expand Down Expand Up @@ -257,11 +268,14 @@ jobs:
- if: matrix.script != 'preview'
run: npm run ${{ matrix.script }}

- if: matrix.script == 'preview'
run: npm run site:preview

- if: matrix.script == 'preview'
run: |
npm run site:preview
export DEPLOY_DOMAIN=https://preview-tdesign-mobile-react-pr-${{ needs.pr-context.outputs.pr_id }}-tdesign-common.surge.sh
npx --project _site surge --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
npx surge --project _site --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
pr-comment:
if: always()
Expand Down

0 comments on commit 772fd06

Please sign in to comment.