init221
run-app / build (push) Failing after 4s Details

This commit is contained in:
wendazhi 2026-02-10 17:54:32 +08:00
parent 96343d124d
commit 8e3fc703d9
1 changed files with 28 additions and 16 deletions

View File

@ -9,24 +9,36 @@ jobs:
build:
runs-on: host
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- name: Install dependencies
- name: Ensure Node.js (install if missing)
run: |
corepack enable
yarn install --frozen-lockfile
if ! command -v node >/dev/null 2>&1; then
echo "Node.js not found, installing..."
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
else
echo "Node.js already installed: $(node -v)"
fi
- name: Clone repository
run: |
set -e
REPO_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
echo "Cloning repo from: ${REPO_URL}"
rm -rf repo
git clone "${REPO_URL}" repo
- name: Build project
run: yarn build
- name: copy dist /data/wwwroot/weizhuozhongzhi-ai
run: |
set -e
cd repo
corepack enable
yarn install --frozen-lockfile
yarn build
- name: Copy dist to /data/wwwroot/weizhuozhongzhi-ai
run: |
set -e
cd repo
mkdir -p /data/wwwroot/weizhuozhongzhi-ai
cp -r ./dist/* /data/wwwroot/weizhuozhongzhi-ai/
rm -rf /data/wwwroot/weizhuozhongzhi-ai/*
cp -r dist/* /data/wwwroot/weizhuozhongzhi-ai/