-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (38 loc) · 1.17 KB
/
deploy-ghpage.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
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Auto Deploy Site
on:
push:
branches:
- master
jobs:
build:
# 使用最新版ubantu虚拟机运行
runs-on: ubuntu-latest
steps:
# from: https://github.com/actions/checkout
- name: 本工作流
uses: actions/checkout@master
# 安装最新版 Node.js
# from: https://github.com/actions/setup-node
- name: 安装 Node.js
uses: actions/setup-node@master
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: 安装包管理器
run: |
npm i -g pnpm
- name: 安装项目依赖
run: |
pnpm i
- name: 构建项目
run: |
pnpm build
- name: 部署到 ghpage
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: ghpage
publish_dir: ./dist
force_orphan: true