fix: 修复 GitHub Actions 部署配置
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)
This commit is contained in:
2026-03-22 11:27:50 +08:00
parent cc890cbd34
commit 2956e8da44
2 changed files with 23 additions and 23 deletions

View File

@@ -14,17 +14,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11', '17' ]
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.Java }}
uses: actions/setup-java@v2
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml -Dmaven.test.skip=true
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: yudao-server
path: yudao-server/target/*.jar

View File

@@ -8,12 +8,12 @@ on:
# branches: [ master ]
env: # 设置环境变量
TZ: Asia/Shanghai # 时区(设置时区可使页面中的`最近更新时间`使用时区时间)
WORK_DIR: yudao-ui-admin #工作目录
WORK_DIR: yudao-ui-admin-vue3 #工作目录
defaults:
run:
shell: bash
working-directory: yudao-ui-admin
working-directory: yudao-ui-admin-vue3
jobs:
build: # 自定义名称
@@ -21,31 +21,27 @@ jobs:
strategy:
matrix:
node_version: [14.x, 16.x]
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@v2 # 使用的动作。格式userName/repoName。作用检出仓库获取源码。 官方actions库https://github.com/actions
uses: actions/checkout@v3 # 使用的动作。格式userName/repoName。作用检出仓库获取源码。 官方actions库https://github.com/actions
- name: Install pnpm
uses: pnpm/action-setup@v2.0.1
uses: pnpm/action-setup@v2
with:
version: 6.15.1
version: 8
- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: "yarn"
cache-dependency-path: yudao-ui-admin/yarn.lock
cache: "pnpm"
cache-dependency-path: yudao-ui-admin-vue3/pnpm-lock.yaml
- name: Install deps
run: node --version && yarn --version && yarn install
run: node --version && pnpm --version && pnpm install
- name: Build
run: yarn build:prod
# 查看 workflow 的文档来获取更多信息
# @see https://github.com/crazy-max/ghaction-github-pages
run: pnpm build:prod