Skip to content

Commit b6f367c

Browse files
authored
chore(workflow): pull request jobs (#50)
* chore(workflow): pull request jobs * chore(workflow): temporarily disable * chore(workflow): change yml path
1 parent 3f793b4 commit b6f367c

File tree

2 files changed

+43
-39
lines changed

2 files changed

+43
-39
lines changed

.github/workflows/pull-request.yml

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,44 @@
11
name: MAIN_PULL_REQUEST
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request_target:
7-
types: [closed]
4+
# push:
5+
# branches: [main]
6+
# pull_request_target:
7+
# types: [closed]
8+
pull_request:
9+
branches: [develop, main, compositionAPI]
10+
types: [opened, synchronize, reopened]
811

912
jobs:
10-
modify-services:
11-
runs-on: ubuntu-latest
12-
outputs:
13-
services-changed: ${{ steps.services-changed.outputs.changed }}
14-
steps:
15-
- uses: actions/checkout@v2
16-
with:
17-
fetch-depth: 100
18-
- uses: marceloprado/has-changed-path@v1
19-
id: services-changed
20-
with:
21-
paths: services
22-
- run: echo services changed=${{ steps.services-changed.outputs.changed }}
13+
call-test-build:
14+
uses: .github/workflows/test-build.yml
15+
# modify-services:
16+
# runs-on: ubuntu-latest
17+
# outputs:
18+
# services-changed: ${{ steps.services-changed.outputs.changed }}
19+
# steps:
20+
# - uses: actions/checkout@v2
21+
# with:
22+
# fetch-depth: 100
23+
# - uses: marceloprado/has-changed-path@v1
24+
# id: services-changed
25+
# with:
26+
# paths: services
27+
# - run: echo services changed=${{ steps.services-changed.outputs.changed }}
2328

24-
upload-services:
25-
runs-on: ubuntu-latest
26-
needs: modify-services
27-
if: needs.modify-services.outputs.services-changed == 'true'
28-
steps:
29-
- uses: actions/checkout@v2
30-
- uses: actions/setup-node@v2
31-
with:
32-
node-version: 18
33-
- run: node ./services/update-components-notice.js
34-
- run: sleep 3s
35-
- run: |
36-
export DEPLOY_DOMAIN=https://tdesign-site-services.surge.sh
37-
npx surge --project ./services --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
38-
echo the preview URL is $DEPLOY_DOMAIN
39-
echo "::set-output name=url::$DEPLOY_DOMAIN"
29+
# upload-services:
30+
# runs-on: ubuntu-latest
31+
# needs: modify-services
32+
# if: needs.modify-services.outputs.services-changed == 'true'
33+
# steps:
34+
# - uses: actions/checkout@v2
35+
# - uses: actions/setup-node@v2
36+
# with:
37+
# node-version: 18
38+
# - run: node ./services/update-components-notice.js
39+
# - run: sleep 3s
40+
# - run: |
41+
# export DEPLOY_DOMAIN=https://tdesign-site-services.surge.sh
42+
# npx surge --project ./services --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
43+
# echo the preview URL is $DEPLOY_DOMAIN
44+
# echo "::set-output name=url::$DEPLOY_DOMAIN"

.github/workflows/test-build.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ jobs:
3939
${{ runner.os }}-build-
4040
${{ runner.os }}-
4141
- run: npm install
42-
4342
- run: npm run lint
44-
- run: npm run test
43+
- run: npm run build
44+
# - run: npm run test
4545
# upload report to codecov
46-
- uses: codecov/codecov-action@v2
47-
with:
48-
token: ${{ secrets.CODECOV_TOKEN }}
46+
# - uses: codecov/codecov-action@v2
47+
# with:
48+
# token: ${{ secrets.CODECOV_TOKEN }}
4949

5050
site:
5151
runs-on: ubuntu-latest
@@ -68,7 +68,6 @@ jobs:
6868
${{ runner.os }}-build-
6969
${{ runner.os }}-
7070
- run: npm install
71-
7271
- name: Build site
7372
run: npm run site:preview
7473

0 commit comments

Comments
 (0)