|
15 | 15 | pr_id: ${{ steps.pr.outputs.id }} |
16 | 16 | tdesign_miniprogram_domain: ${{ steps.tdesign-miniprogram-domain.outputs.tdesign_miniprogram_domain }} |
17 | 17 | tdesign_miniprogram_chat_domain: ${{ steps.tdesign-miniprogram-chat-domain.outputs.tdesign_miniprogram_chat_domain }} |
| 18 | + tdesign_uniapp_domain: ${{ steps.tdesign-uniapp-domain.outputs.tdesign_uniapp_domain }} |
| 19 | + tdesign_uniapp_chat_domain: ${{ steps.tdesign-uniapp-chat-domain.outputs.tdesign_uniapp_chat_domain }} |
18 | 20 | steps: |
19 | 21 | - name: Download pr id |
20 | | - uses: dawidd6/action-download-artifact@v8 |
| 22 | + uses: dawidd6/action-download-artifact@v12 |
21 | 23 | with: |
22 | 24 | workflow: ${{ github.event.workflow_run.workflow_id }} |
23 | 25 | run_id: ${{ github.event.workflow_run.id }} |
|
40 | 42 | runs-on: ubuntu-latest |
41 | 43 | needs: preview-context |
42 | 44 | steps: |
43 | | - - uses: dawidd6/action-download-artifact@v8 |
| 45 | + - uses: dawidd6/action-download-artifact@v12 |
44 | 46 | with: |
45 | 47 | workflow: ${{ github.event.workflow_run.workflow_id }} |
46 | 48 | run_id: ${{ github.event.workflow_run.id }} |
|
54 | 56 | runs-on: ubuntu-latest |
55 | 57 | needs: preview-context |
56 | 58 | steps: |
57 | | - - uses: dawidd6/action-download-artifact@v8 |
| 59 | + - uses: dawidd6/action-download-artifact@v12 |
58 | 60 | with: |
59 | 61 | workflow: ${{ github.event.workflow_run.workflow_id }} |
60 | 62 | run_id: ${{ github.event.workflow_run.id }} |
|
63 | 65 | export DEPLOY_DOMAIN=${{ needs.preview-context.outputs.tdesign_miniprogram_chat_domain }} |
64 | 66 | npx surge --project ./ --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }} |
65 | 67 |
|
| 68 | + tdesign-uniapp: |
| 69 | + if: github.event.workflow_run.conclusion == 'success' |
| 70 | + runs-on: ubuntu-latest |
| 71 | + needs: preview-context |
| 72 | + steps: |
| 73 | + - uses: dawidd6/action-download-artifact@v12 |
| 74 | + with: |
| 75 | + workflow: ${{ github.event.workflow_run.workflow_id }} |
| 76 | + run_id: ${{ github.event.workflow_run.id }} |
| 77 | + name: tdesign-uniapp-site |
| 78 | + - run: | |
| 79 | + export DEPLOY_DOMAIN=${{ needs.preview-context.outputs.tdesign_uniapp_domain }} |
| 80 | + npx surge --project ./ --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }} |
| 81 | +
|
| 82 | + tdesign-uniapp-chat: |
| 83 | + if: github.event.workflow_run.conclusion == 'success' |
| 84 | + runs-on: ubuntu-latest |
| 85 | + needs: preview-context |
| 86 | + steps: |
| 87 | + - uses: dawidd6/action-download-artifact@v12 |
| 88 | + with: |
| 89 | + workflow: ${{ github.event.workflow_run.workflow_id }} |
| 90 | + run_id: ${{ github.event.workflow_run.id }} |
| 91 | + name: tdesign-uniapp-chat-site |
| 92 | + - run: | |
| 93 | + export DEPLOY_DOMAIN=${{ needs.preview-context.outputs.tdesign_uniapp_chat_domain }} |
| 94 | + npx surge --project ./ --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }} |
| 95 | +
|
66 | 96 | preview-comment: |
67 | 97 | if: always() |
68 | 98 | needs: |
|
79 | 109 | const pr_id = ${{ needs.preview-context.outputs.pr_id }}; |
80 | 110 | const tdesign_miniprogram_domain = "${{ needs.preview-context.outputs.tdesign_miniprogram_domain }}"; |
81 | 111 | const tdesign_miniprogram_chat_domain = "${{ needs.preview-context.outputs.tdesign_miniprogram_chat_domain }}"; |
| 112 | + const tdesign_uniapp_domain = "${{ needs.preview-context.outputs.tdesign_uniapp_domain }}"; |
| 113 | + const tdesign_uniapp_chat_domain = "${{ needs.preview-context.outputs.tdesign_uniapp_chat_domain }}"; |
82 | 114 |
|
83 | 115 | const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRun({ |
84 | 116 | owner: context.repo.owner, |
|
90 | 122 | const tdesign = { |
91 | 123 | "tdesign-miniprogram": { status: "", report_url: "" }, |
92 | 124 | "tdesign-miniprogram-chat": { status: "", report_url: "" }, |
| 125 | + "tdesign-uniapp": { status: "", report_url: "" }, |
| 126 | + "tdesign-uniapp-chat": { status: "", report_url: "" }, |
93 | 127 | }; |
94 | 128 | const preview_success = `<img width="300" alt="完成" src="https://user-images.githubusercontent.com/15634204/150816437-9f5bb788-cd67-4cbc-9897-b82d74e9aa65.png" />`; |
95 | 129 | const preview_failure = `<img width="300" alt="失败" src="https://user-images.githubusercontent.com/5378891/75333447-1e63a280-58c1-11ea-975d-235367fd1522.png" />`; |
|
0 commit comments