Skip to content

Commit 9160bf6

Browse files
committed
ci(workflows): 添加GitHub action
1 parent 219fe49 commit 9160bf6

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Deploy CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: checkout
13+
uses: actions/checkout@v2
14+
15+
- name: build
16+
run: npm install && npm run build
17+
18+
- name: Deploy
19+
uses: peaceiris/actions-gh-pages@v3
20+
with:
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
22+
publish_dir: ./dist

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"check": "vue-tsc --noEmit",
2727
"serve": "npm run dev",
2828
"dev": "vite",
29-
"build": "vue-tsc --noEmit && vite build",
29+
"build": "vite build",
30+
"build:check":"vue-tsc --noEmit && vite build",
3031
"build:no-cache": "yarn clean:cache && npm run build",
3132
"preview": "vite preview",
3233
"clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite",

0 commit comments

Comments
 (0)