mirror of
https://github.com/142vip/408CSFamily.git
synced 2026-02-02 18:20:26 +08:00
perf: ci脚本新增pnpm安装,优化CI、CD流水线
This commit is contained in:
32
.github/workflows/CD.yaml
vendored
32
.github/workflows/CD.yaml
vendored
@@ -32,21 +32,23 @@ jobs:
|
||||
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
|
||||
fetch-depth: 0
|
||||
|
||||
## 依赖下载完成后,或执行思维导图编译
|
||||
- name: PNPM Install
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 7
|
||||
run_install: |
|
||||
args: [--frozen-lockfile, --registry=https://registry.npmmirror.com]
|
||||
|
||||
# - name: Install Node.js
|
||||
# uses: actions/setup-node@v3
|
||||
# ## 依赖下载完成后,或执行思维导图编译
|
||||
# - name: PNPM Install
|
||||
# uses: pnpm/action-setup@v2
|
||||
# with:
|
||||
# node-version: 18.18.0
|
||||
# ## 淘宝镜像加速
|
||||
# registry-url: 'https://registry.npmmirror.com'
|
||||
# cache: 'pnpm'
|
||||
# version: 7
|
||||
# run_install: |
|
||||
# args: [--frozen-lockfile, --registry=https://registry.npmmirror.com]
|
||||
|
||||
# 安装Node环境
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.18.0
|
||||
## 淘宝镜像加速
|
||||
registry-url: 'https://registry.npmmirror.com'
|
||||
|
||||
- run: ./scripts/ci
|
||||
|
||||
# 运行构建脚本
|
||||
- name: Build VuePress Site
|
||||
@@ -75,7 +77,7 @@ jobs:
|
||||
|
||||
## 注意: 这里的操作时间vercel平台配置的命令拉取下来,执行
|
||||
- name: Pull Vercel Environment Information
|
||||
run: npm i vercel -g && vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
|
||||
run: npm i -g vercel && vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
|
||||
|
||||
## 执行vercel平台配置的命令
|
||||
- name: Build Project Artifacts
|
||||
|
||||
29
.github/workflows/CI.yml
vendored
29
.github/workflows/CI.yml
vendored
@@ -33,21 +33,22 @@ jobs:
|
||||
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
|
||||
fetch-depth: 0
|
||||
|
||||
## 依赖下载完成后,或执行思维导图编译
|
||||
- name: PNPM Install
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 7
|
||||
run_install: |
|
||||
args: [--frozen-lockfile, --registry=https://registry.npmmirror.com]
|
||||
|
||||
# - name: Install Node.js
|
||||
# uses: actions/setup-node@v3
|
||||
# ## 依赖下载完成后,或执行思维导图编译
|
||||
# - name: PNPM Install
|
||||
# uses: pnpm/action-setup@v2
|
||||
# with:
|
||||
# node-version: 18.18.0
|
||||
# ## 淘宝镜像加速
|
||||
# registry-url: 'https://registry.npmmirror.com'
|
||||
# cache: 'pnpm'
|
||||
# version: 7
|
||||
# run_install: |
|
||||
# args: [--frozen-lockfile, --registry=https://registry.npmmirror.com]
|
||||
# 安装Node环境
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.18.0
|
||||
## 淘宝镜像加速
|
||||
registry-url: 'https://registry.npmmirror.com'
|
||||
|
||||
- run: ./scripts/ci
|
||||
|
||||
- name: Cache Dependencies
|
||||
uses: actions/cache@v3
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
## 下载依赖
|
||||
pnpm i --frozen-lockfile --registry https://registry.npmmirror.com
|
||||
npm i -g pnpm@7 && pnpm i --frozen-lockfile --registry https://registry.npmmirror.com
|
||||
Reference in New Issue
Block a user