init221
run-app / build (push) Failing after 4s
Details
run-app / build (push) Failing after 4s
Details
This commit is contained in:
parent
96343d124d
commit
8e3fc703d9
|
|
@ -9,24 +9,36 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: host
|
runs-on: host
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Ensure Node.js (install if missing)
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
cache: 'yarn'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
run: |
|
||||||
corepack enable
|
if ! command -v node >/dev/null 2>&1; then
|
||||||
yarn install --frozen-lockfile
|
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
|
- name: Build project
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
- name: copy dist /data/wwwroot/weizhuozhongzhi-ai
|
|
||||||
run: |
|
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
|
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/
|
||||||
Loading…
Reference in New Issue