-
Notifications
You must be signed in to change notification settings - Fork 268
40 lines (37 loc) · 1.18 KB
/
pull-request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: MAIN_PULL_REQUEST
on:
push:
branches: [main]
pull_request_target:
types: [closed]
jobs:
modify-services:
if: github.repository == 'Tencent/tdesign'
runs-on: ubuntu-latest
outputs:
services-changed: ${{ steps.services-changed.outputs.changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
- uses: marceloprado/has-changed-path@v1
id: services-changed
with:
paths: services
- run: echo services changed=${{ steps.services-changed.outputs.changed }}
upload-services:
runs-on: ubuntu-latest
needs: modify-services
if: needs.modify-services.outputs.services-changed == 'true'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: node ./services/update-components-notice.js
- run: sleep 3s
- run: |
export DEPLOY_DOMAIN=https://tdesign-site-services.surge.sh
npx surge --project ./services --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
echo the preview URL is $DEPLOY_DOMAIN
echo "::set-output name=url::$DEPLOY_DOMAIN"