fix ci-cd
Some checks failed
Deploy triz-docs to civital server / build-and-deploy (push) Failing after 1h8m6s
Some checks failed
Deploy triz-docs to civital server / build-and-deploy (push) Failing after 1h8m6s
This commit is contained in:
parent
8df8c91454
commit
57d4e73e55
@ -41,9 +41,10 @@ jobs:
|
||||
|
||||
# --------------------------------------------------
|
||||
# 3. Install dependencies
|
||||
# - No conditional rmdir (was causing silent abort)
|
||||
# - Prints CWD and directory listing so we can see
|
||||
# exactly what npm ci is working with
|
||||
# - No echo+command chaining with & (triggers runner's
|
||||
# implicit error check on some Gitea act_runner versions)
|
||||
# - npm install instead of npm ci: works even if
|
||||
# package-lock.json is missing or outdated
|
||||
# --------------------------------------------------
|
||||
- name: Install dependencies
|
||||
if: success()
|
||||
@ -51,22 +52,25 @@ jobs:
|
||||
run: |
|
||||
set PATH=%NODE_PATH%;%PATH%
|
||||
cd /d "%WORKSPACE_DIR%"
|
||||
echo [diag] Working dir: %CD%
|
||||
echo [diag] Node: & node --version
|
||||
echo [diag] npm: & npm --version
|
||||
echo [diag] Files in workspace:
|
||||
dir /B "%WORKSPACE_DIR%"
|
||||
echo [diag] Running npm ci...
|
||||
npm ci
|
||||
echo [diag] Working dir:
|
||||
echo %CD%
|
||||
echo [diag] Node version:
|
||||
node --version
|
||||
echo [diag] npm version:
|
||||
npm --version
|
||||
echo [diag] package.json present:
|
||||
if exist "package.json" (echo YES) else (echo NO - ABORTING && exit /b 1)
|
||||
echo [diag] Running npm install...
|
||||
npm install
|
||||
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
|
||||
echo [diag] npm ci done. Contents of node_modules\.bin:
|
||||
dir /B "%WORKSPACE_DIR%\node_modules\.bin"
|
||||
echo [diag] Checking docusaurus installed:
|
||||
if exist "node_modules\.bin\docusaurus.cmd" (echo YES) else (echo NO - ABORTING && exit /b 1)
|
||||
echo [diag] Install complete.
|
||||
|
||||
# --------------------------------------------------
|
||||
# 4. Build
|
||||
# Calls node directly — avoids .cmd resolution and
|
||||
# PATH issues entirely. Works even if node_modules\.bin
|
||||
# is not in PATH at all.
|
||||
# npx finds the local docusaurus binary automatically —
|
||||
# no hardcoded paths, no PATH resolution needed
|
||||
# --------------------------------------------------
|
||||
- name: Build
|
||||
if: success()
|
||||
@ -74,11 +78,10 @@ jobs:
|
||||
run: |
|
||||
set PATH=%NODE_PATH%;%PATH%
|
||||
cd /d "%WORKSPACE_DIR%"
|
||||
echo [diag] Starting build via node...
|
||||
node "%WORKSPACE_DIR%\node_modules\@docusaurus\core\bin\docusaurus.js" build
|
||||
echo [diag] Starting Docusaurus build...
|
||||
npx docusaurus build
|
||||
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
|
||||
echo [diag] Build output:
|
||||
dir /B "%WORKSPACE_DIR%\build"
|
||||
echo [diag] Build complete.
|
||||
|
||||
# --------------------------------------------------
|
||||
# 5. Deploy
|
||||
|
||||
Loading…
Reference in New Issue
Block a user