ci
Some checks failed
study-online / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
libingxiang 2025-08-04 17:15:01 +08:00
parent 694b6374e9
commit c542d008e7

View File

@ -32,36 +32,17 @@ jobs:
unset CI unset CI
nvm use 23.5.0 nvm use 23.5.0
# 安装依赖 - name: Compile code and build
- name: Install dependencies
run: | run: |
echo "Installing dependencies..." export NVM_DIR="$HOME/.nvm"
# 使用 --legacy-peer-deps 避免依赖冲突 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
npm install --legacy-peer-deps unset CI
nvm use 22.14.0
# 构建项目 yarn
- name: Build project yarn build
run: | cd dist/
echo "Building project..." zip -r study-online.zip .
# 设置环境变量 mv study-online.zip /yantoo/pkg/
export NODE_OPTIONS="--no-warnings" sh /yantoo/bin/front.sh
export VITE_CJS_IGNORE_WARNING=true
# 执行构建
npm run build
# 移动构建产物
- name: Move dist folder to target directory
run: |
if [ ! -d "dist" ]; then
echo "Error: dist directory not found"
ls -la
exit 1
fi
echo "Dist directory found, moving to /yantoo/frontend/study-online/"
sudo mkdir -p /yantoo/frontend/study-online
sudo rm -rf /yantoo/frontend/study-online/*
sudo cp -r dist/* /yantoo/frontend/study-online/
echo "Files successfully moved to /yantoo/frontend/study-online/" echo "Files successfully moved to /yantoo/frontend/study-online/"