Some checks failed
Build and Deploy / deploy (push) Has been cancelled
前端部署修复: - 修复工作目录:yudao-ui-admin → yudao-ui-admin-vue3 - 修复包管理器:yarn → pnpm - 更新 pnpm 版本:6.15.1 → 8 - 修复缓存路径:yarn.lock → pnpm-lock.yaml - 更新 actions 版本:v2 → v3 后端部署优化: - 更新 actions 版本到最新 - 添加 artifact 上传功能 - 简化 Java 版本矩阵(只保留 17)
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: yudao-ui-admin CI
|
||
|
||
# 在master分支发生push事件时触发。
|
||
on:
|
||
push:
|
||
branches: [ master ]
|
||
# pull_request:
|
||
# branches: [ master ]
|
||
env: # 设置环境变量
|
||
TZ: Asia/Shanghai # 时区(设置时区可使页面中的`最近更新时间`使用时区时间)
|
||
WORK_DIR: yudao-ui-admin-vue3 #工作目录
|
||
|
||
defaults:
|
||
run:
|
||
shell: bash
|
||
working-directory: yudao-ui-admin-vue3
|
||
|
||
jobs:
|
||
build: # 自定义名称
|
||
runs-on: ubuntu-latest # 运行在虚拟机环境ubuntu-latest
|
||
|
||
strategy:
|
||
matrix:
|
||
node_version: [18.x, 20.x]
|
||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||
|
||
steps:
|
||
- name: Checkout # 步骤1
|
||
uses: actions/checkout@v3 # 使用的动作。格式:userName/repoName。作用:检出仓库,获取源码。 官方actions库:https://github.com/actions
|
||
|
||
- name: Install pnpm
|
||
uses: pnpm/action-setup@v2
|
||
with:
|
||
version: 8
|
||
|
||
- name: Set node version to ${{ matrix.node_version }}
|
||
uses: actions/setup-node@v3
|
||
with:
|
||
node-version: ${{ matrix.node_version }}
|
||
cache: "pnpm"
|
||
cache-dependency-path: yudao-ui-admin-vue3/pnpm-lock.yaml
|
||
|
||
- name: Install deps
|
||
run: node --version && pnpm --version && pnpm install
|
||
|
||
- name: Build
|
||
run: pnpm build:prod
|