-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1.02 KB
/
deploy.yaml
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
name: Build and Deploy
# 监听 main 分支的推送
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
# job 名
build-and-deploy:
# 运行环境
runs-on: ubuntu-latest
# 运行步骤
steps:
# 获取源码
- name: Checkout
uses: actions/checkout@v3
# # 指定node版本
# - name: Setup Node.js environment
# uses: actions/setup-node@v3
# with:
# node-version: 18
# # 下载依赖
# - name: Install dependencies and Build
# run: npm install && npm run build
# 发布
- name: Deploy
uses: JamesIves/[email protected]
with:
# 发布在 gh-pages 分支,会自动创建
branch: gh-pages
# 将打包后的 dist 目录放到 gh-pages 分支
folder: .vitepress/dist