fix ci-cd
Some checks failed
Deploy triz-docs to civital server / build-and-deploy (push) Failing after 1h8m5s
Some checks failed
Deploy triz-docs to civital server / build-and-deploy (push) Failing after 1h8m5s
This commit is contained in:
parent
7510e3728b
commit
8df8c91454
@ -41,9 +41,9 @@ jobs:
|
||||
|
||||
# --------------------------------------------------
|
||||
# 3. Install dependencies
|
||||
# Force-remove any node_modules committed to the repo
|
||||
# before installing — they would be Linux binaries
|
||||
# that don't work on Windows
|
||||
# - No conditional rmdir (was causing silent abort)
|
||||
# - Prints CWD and directory listing so we can see
|
||||
# exactly what npm ci is working with
|
||||
# --------------------------------------------------
|
||||
- name: Install dependencies
|
||||
if: success()
|
||||
@ -51,25 +51,22 @@ jobs:
|
||||
run: |
|
||||
set PATH=%NODE_PATH%;%PATH%
|
||||
cd /d "%WORKSPACE_DIR%"
|
||||
echo [diag] Node and npm versions:
|
||||
node --version
|
||||
npm --version
|
||||
echo [diag] Removing any committed node_modules...
|
||||
if exist "node_modules" rmdir /S /Q "node_modules"
|
||||
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
|
||||
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
|
||||
echo [diag] Verifying docusaurus binary exists:
|
||||
if not exist "node_modules\.bin\docusaurus.cmd" (
|
||||
echo ERROR: docusaurus.cmd not found in node_modules\.bin
|
||||
exit /b 1
|
||||
)
|
||||
echo [diag] Install complete.
|
||||
echo [diag] npm ci done. Contents of node_modules\.bin:
|
||||
dir /B "%WORKSPACE_DIR%\node_modules\.bin"
|
||||
|
||||
# --------------------------------------------------
|
||||
# 4. Build
|
||||
# Call docusaurus.cmd directly — avoids all PATH
|
||||
# resolution issues with npm run on Windows
|
||||
# Calls node directly — avoids .cmd resolution and
|
||||
# PATH issues entirely. Works even if node_modules\.bin
|
||||
# is not in PATH at all.
|
||||
# --------------------------------------------------
|
||||
- name: Build
|
||||
if: success()
|
||||
@ -77,10 +74,10 @@ jobs:
|
||||
run: |
|
||||
set PATH=%NODE_PATH%;%PATH%
|
||||
cd /d "%WORKSPACE_DIR%"
|
||||
echo [diag] Starting Docusaurus build...
|
||||
call "%WORKSPACE_DIR%\node_modules\.bin\docusaurus.cmd" build
|
||||
echo [diag] Starting build via node...
|
||||
node "%WORKSPACE_DIR%\node_modules\@docusaurus\core\bin\docusaurus.js" build
|
||||
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
|
||||
echo [diag] Build complete. Output:
|
||||
echo [diag] Build output:
|
||||
dir /B "%WORKSPACE_DIR%\build"
|
||||
|
||||
# --------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user