32 lines
580 B
YAML
32 lines
580 B
YAML
name: 自动部署
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: 克隆代码
|
|
uses: actions/checkout@v2
|
|
|
|
- name: 设置NodeJS环境
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: 安装依赖
|
|
run: pnpm install
|
|
|
|
- name: 构建产物
|
|
run: pnpm run build
|
|
|
|
- name: 部署到 gh-pages 分支
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./dist
|