-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.29 KB
/
deploy.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
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Deploy Vue Site to GitHub Pages
on:
push:
branches: [master]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
concurrency:
group: deploy
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install PNPM
run: npm install -g pnpm
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Install Dependencies in Doc Directory
working-directory: ./doc
run: pnpm install
- name: Build Vue App
working-directory: ./doc
run: pnpm run build
# 使用官方的actions/deploy-pages行动部署到GitHub Pages,但需注意actions/deploy-pages@v4并不存在,应使用其他适合的部署action
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.TOKEN }}
publish_dir: ./doc/dist