Files
clinica-veterinaria-formigi…/deploy_to_local_server.bat

50 lines
874 B
Batchfile

@echo off
setlocal
set "DEPLOY_ROOT=C:\deploy\clinica_veterinaria_formiginese"
set "APP_DIR=%DEPLOY_ROOT%\clinica-app"
echo === Deploy demo Clinica Veterinaria Formiginese ===
echo.
if not exist "%DEPLOY_ROOT%\" (
echo ERRORE: cartella deploy non trovata: "%DEPLOY_ROOT%"
exit /b 1
)
if not exist "%APP_DIR%\" (
echo ERRORE: cartella app non trovata: "%APP_DIR%"
exit /b 1
)
echo [1/3] Aggiornamento repository di deploy...
pushd "%DEPLOY_ROOT%" || exit /b 1
git pull
if errorlevel 1 (
echo.
echo ERRORE: git pull non riuscito.
popd
exit /b 1
)
popd
echo.
echo [2/3] Build frontend...
pushd "%APP_DIR%" || exit /b 1
call pnpm run build
if errorlevel 1 (
echo.
echo ERRORE: build non riuscita.
popd
exit /b 1
)
popd
echo.
echo [3/3] Deploy completato.
echo I file aggiornati sono serviti da Caddy da:
echo %APP_DIR%\dist\public
echo.
endlocal