-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 937 Bytes
/
build.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
41
42
name: Build
on:
# 每当 push 到 main 分支时触发部署
push:
branches: [main]
# 手动触发部署
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
- name: Install node
uses: actions/setup-node@v3
with:
cache: pnpm
- name: Install
working-directory: ./example/vue-demo
run: pnpm install
- name: Run Build
working-directory: ./example/vue-demo
run: pnpm run build
- name: echo cname
run: echo 'paragraph.elonehoo.xyz' > example/vue-demo/dist/CNAME
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: example/vue-demo/dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}