mirror of
https://gitee.com/cai_xiao_feng/lowflow-design.git
synced 2025-12-06 16:18:22 +08:00
添加一键部署脚本
This commit is contained in:
parent
d808a6cafe
commit
1f31d61c59
43
.github/workflows/gh-pages.yml
vendored
Normal file
43
.github/workflows/gh-pages.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
name: GitHub Pages
|
||||||
|
# 触发脚本的条件,develop分支push代码的时候
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
# 要执行的任务
|
||||||
|
jobs:
|
||||||
|
# 任务名称
|
||||||
|
build_and_deploy:
|
||||||
|
# runs-on 指定job任务运行所需要的虚拟机环境(必填)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# 任务步骤
|
||||||
|
steps:
|
||||||
|
- name: 迁出代码
|
||||||
|
# 使用action库 actions/checkout获取源码
|
||||||
|
uses: actions/checkout@v3 # 使用的工具
|
||||||
|
# 使用 pnpm
|
||||||
|
- name: 使用 pnpm
|
||||||
|
uses: pnpm/action-setup@v2
|
||||||
|
with:
|
||||||
|
version: 8.5.0
|
||||||
|
# 安装node
|
||||||
|
- name: 安装node.js
|
||||||
|
# 使用action库 actions/setup-node 安装node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16.20.0
|
||||||
|
cache: 'pnpm'
|
||||||
|
# 安装
|
||||||
|
- name: 安装依赖
|
||||||
|
run: pnpm install
|
||||||
|
# 打包
|
||||||
|
- name: 打包
|
||||||
|
run: pnpm build:test
|
||||||
|
# 部署
|
||||||
|
- name: 部署到gh-pages分支
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./dist
|
||||||
|
# 指定推送分支,默认为:gh-pages
|
||||||
|
publish_branch: gh-pages
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,6 +9,5 @@ dist-ssr
|
|||||||
# lock
|
# lock
|
||||||
yarn.lock
|
yarn.lock
|
||||||
package-lock.json
|
package-lock.json
|
||||||
pnpm-lock.yaml
|
|
||||||
|
|
||||||
*.log
|
*.log
|
||||||
|
|||||||
2245
pnpm-lock.yaml
generated
Normal file
2245
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user