feat(@142vip/fairy-cli): 新增sync命令,支持npm包同步到cnpm仓库 #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 代码检查 | |
name: CI | |
# 触发条件 | |
on: | |
# 提PR到next分支触发CI | |
pull_request: | |
branches: | |
- next | |
# push: | |
# branches: | |
# - next | |
# 手动触发部署 | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 1 * *' | |
jobs: | |
# 本地构建 | |
Base-Build: | |
name: 基础编译构建 | |
runs-on: ubuntu-latest | |
if: github.repository == '142vip/core-x' && github.event_name == 'pull_request' | |
permissions: | |
actions: read | |
pull-requests: read | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录 | |
fetch-depth: 0 | |
# 安装PNPM | |
- name: PNPM Install | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9.6.0 | |
# 安装Node环境 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.12.2 | |
# 淘宝镜像加速 | |
registry-url: 'https://registry.npmmirror.com' | |
# 缓存 | |
cache: pnpm | |
# 下载依赖,并执行初始化脚本:钩子函数、思维导图构建 | |
- name: Install Dependencies | |
run: | | |
./scripts/ci | |
# Eslint 检测 | |
- name: Code LintFix | |
run: | | |
npx eslint . | |
# 编译静态网站 | |
- name: Build Core-X Docs | |
run: | | |
pnpm build:docs | |
- name: Build Code | |
run: | | |
pnpm build |