38 lines
641 B
YAML
38 lines
641 B
YAML
name: 自动部署
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
pages: write
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: 克隆代码
|
|
uses: actions/checkout@v2
|
|
|
|
- name: 设置环境
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: latest
|
|
|
|
- name: 安装依赖
|
|
run: pnpm install
|
|
|
|
- name: 构建产物
|
|
run: pnpm run build
|
|
|
|
- name: 上传产物
|
|
uses: actions/upload-pages-artifact@v2
|
|
with:
|
|
path: ./dist
|
|
|
|
- name: 部署分支
|
|
uses: actions/deploy-pages@v2
|