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