blob: d8667a5dccb833550b1fe0698739bb4f963a3a32 [file] [log] [blame]
86133aaa3f5d2025-04-20 21:33:29 +08001name: Preview Build
2
3on:
4 pull_request:
5 types: [opened, synchronize, reopened]
6
7permissions:
8 contents: read
9
10jobs:
11 build-preview:
12 runs-on: ubuntu-latest
13
14 steps:
15 - uses: actions/checkout@v2
16 with:
17 ref: ${{ github.event.pull_request.head.sha }}
18
19 - name: build
20 run: |
21 yarn
22 yarn add umi-plugin-pro --save
23 yarn build
24
25 - name: upload dist artifact
26 uses: actions/upload-artifact@v2
27 with:
28 name: dist
29 path: dist/
30 retention-days: 5
31
32 - name: Save PR number
33 if: ${{ always() }}
34 run: echo ${{ github.event.number }} > ./pr-id.txt
35
36 - name: Upload PR number
37 if: ${{ always() }}
38 uses: actions/upload-artifact@v2
39 with:
40 name: pr
41 path: ./pr-id.txt