Skip to content

Commit b862585

Browse files
authored
ci: fix preview publish (#4262)
1 parent e639098 commit b862585

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

.github/workflows/preview-publish.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: preview-publish
22

33
on:
44
workflow_run:
5-
workflows:
5+
workflows:
66
- preview-build
77
types:
88
- completed
@@ -11,7 +11,7 @@ jobs:
1111
preview-context:
1212
if: github.event.workflow_run.conclusion == 'success'
1313
runs-on: ubuntu-latest
14-
outputs:
14+
outputs:
1515
pr_id: ${{ steps.pr.outputs.id }}
1616
tdesign_react_domain: ${{ steps.tdesign-react-domain.outputs.tdesign_react_domain }}
1717
tdesign_react_chat_domain: ${{ steps.tdesign-react-chat-domain.outputs.tdesign_react_chat_domain }}
@@ -22,9 +22,9 @@ jobs:
2222
workflow: ${{ github.event.workflow_run.workflow_id }}
2323
run_id: ${{ github.event.workflow_run.id }}
2424
name: pr-id
25-
25+
2626
- name: Set pr id
27-
id : pr
27+
id: pr
2828
run: echo "id=$(cat pr-id.txt)" >> $GITHUB_OUTPUT
2929

3030
- name: tdesign-react-domain
@@ -34,7 +34,7 @@ jobs:
3434
- name: tdesign-react-chat-domain
3535
id: tdesign-react-chat-domain
3636
run: echo "tdesign_react_chat_domain=https://preview-pr-${{ steps.pr.outputs.id }}-tdesign-react-chat.surge.sh" >> $GITHUB_OUTPUT
37-
37+
3838
tdesign-react:
3939
if: github.event.workflow_run.conclusion == 'success'
4040
runs-on: ubuntu-latest
@@ -47,8 +47,8 @@ jobs:
4747
name: tdesign-react-site
4848
- run: |
4949
export DEPLOY_DOMAIN=${{ needs.preview-context.outputs.tdesign_react_domain }}
50-
npx surge --project ./ --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
51-
50+
npx surge --project ./ --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
51+
5252
tdesign-react-chat:
5353
if: github.event.workflow_run.conclusion == 'success'
5454
runs-on: ubuntu-latest
@@ -61,8 +61,8 @@ jobs:
6161
name: tdesign-react-chat-site
6262
- run: |
6363
export DEPLOY_DOMAIN=${{ needs.preview-context.outputs.tdesign_react_chat_domain }}
64-
npx surge --project ./ --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
65-
64+
npx surge --project ./ --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
65+
6666
preview-comment:
6767
if: always()
6868
needs:
@@ -86,7 +86,7 @@ jobs:
8686
run_id: context.runId,
8787
per_page: 100
8888
})
89-
89+
9090
const tdesign = {
9191
"tdesign-react": { status: "", report_url: "" },
9292
"tdesign-react-chat": { status: "", report_url: "" },
@@ -131,13 +131,13 @@ jobs:
131131
132132
<!-- AUTO_PREVIEW_HOOK -->
133133
`;
134-
134+
135135
core.setOutput('comment', comment);
136-
136+
137137
- name: comment
138-
uses:TDesignOteam/workflows/actions/maintain-one-comment@main
138+
uses: TDesignOteam/workflows/actions/maintain-one-comment@main
139139
with:
140-
token: ${{ secrets.TDESIGN_BOT_TOKEN }}
141-
number: ${{needs.preview-context.outputs.pr_id}}
142-
body: ${{ steps.report.outputs.comment }}
143-
body-include: '<!-- AUTO_PREVIEW_HOOK -->'
140+
token: ${{ secrets.TDESIGN_BOT_TOKEN }}
141+
number: ${{needs.preview-context.outputs.pr_id}}
142+
body: ${{ steps.report.outputs.comment }}
143+
body-include: '<!-- AUTO_PREVIEW_HOOK -->'

0 commit comments

Comments
 (0)