From e472db461dad5192943231421e91134a2047ecbc Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Fri, 30 Jan 2026 04:58:27 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20Add=20local=20deployment=20suppo?= =?UTF-8?q?rt=20and=20improve=20error=20handling=20in=20deploy=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/utils/deploy-pokedex.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/utils/deploy-pokedex.js b/code/utils/deploy-pokedex.js index 006f306..34b646a 100644 --- a/code/utils/deploy-pokedex.js +++ b/code/utils/deploy-pokedex.js @@ -282,6 +282,7 @@ async function deploy() { ); throw new Error(`SSH connection failed: ${connError.message}`); } + } // Build Vue 3 application console.log('\n🔨 Building Vue 3 application...'); @@ -316,6 +317,11 @@ async function deploy() { throw new Error(`Build failed: ${error.message}`); } + if (isLocal) { + await deployLocal(config); + return; + } + // Check if container exists and capture current image console.log('\n📦 Checking for existing container...'); console.log(` Container name: ${CONTAINER_NAME}`); @@ -565,6 +571,10 @@ async function deploy() { ssh.dispose(); } catch (error) { + if (config && config.target === 'local') { + console.error('\n❌ Deployment failed:', error.message); + process.exit(1); + } console.error('\n❌ Deployment failed:', error.message); // Rollback