1
0
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:
chu fan
2023-10-16 18:49:51 +08:00
parent 6bfc66d730
commit 67c38b0564
3 changed files with 33 additions and 30 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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