-
Notifications
You must be signed in to change notification settings - Fork 138
38 lines (31 loc) · 993 Bytes
/
doc.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
name: Build and Deploy Docs
on:
push:
branches:
- master # 当在main分支上有代码推送时触发
jobs:
docs-build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3 # 检出代码
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install pnpm & build
run: |
cd docs
npm install -g pnpm
mkdir -p ~/.pnpm-global
pnpm config set global-bin-dir ~/.pnpm-global
echo "$HOME/.pnpm-global" >> $GITHUB_PATH
pnpm install
pnpm run docs:b
- name: Deploy to gh-pages
uses: JamesIves/github-pages-deploy-action@v4.6.1 # 使用部署到gh-pages的Action
with:
token: ${{ secrets.ACCESS_TOKEN }} # GitHub Token,需要在仓库Secrets中设置
branch: master # 要部署到的分支
repository-name: blazeb2/blazeb2.github.io
folder: ./docs/.vitepress/dist