Skip to content

Commit 90e50d1

Browse files
cs1707hzsrc
authored andcommitted
Chore: create preview.yml (ElemeFE#21457)
1 parent 9e59ea4 commit 90e50d1

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/preview.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Website Preview
2+
3+
on: pull_request
4+
5+
jobs:
6+
preview:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
11+
- uses: actions/setup-node@v2
12+
with:
13+
node-version: '10.15.0'
14+
registry-url: https://registry.npmjs.com/
15+
16+
- uses: afc163/surge-preview@v1
17+
id: preview_step
18+
with:
19+
surge_token: ${{ secrets.SURGE_TOKEN }}
20+
github_token: ${{ secrets.GITHUB_TOKEN }}
21+
dist: examples/element-ui/
22+
build: |
23+
npm run bootstrap
24+
npm run deploy:build
25+
26+
- name: Get the preview_url
27+
run: echo "url => ${{ steps.preview_step.outputs.preview_url }}"

0 commit comments

Comments
 (0)