From bc8cae3ea050b6fcd7d1f82d0eaf01e534950a11 Mon Sep 17 00:00:00 2001 From: Bayda77 Date: Sun, 4 Jan 2026 04:35:07 -0600 Subject: [PATCH] test: dep --- .github/workflows/deploy.yml | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e93a3f4..d50f24c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,31 +16,8 @@ jobs: key: ${{ secrets.SSH_PRIVATE_KEY }} passphrase: ${{ secrets.SSH_PASSPHRASE }} script: | - powershell -Command " - # Clone or update repository - if (Test-Path 'C:\projects\digital-resume-FE') { - Set-Location C:\projects\digital-resume-FE - git pull origin main - } else { - New-Item -ItemType Directory -Path C:\projects -Force - Set-Location C:\projects - git clone https://gitea.sashabayda.ca/Bayda77/digital-resume-FE.git - Set-Location digital-resume-FE - } - - # Stop and remove existing container - `$container = docker ps -a -q -f name=resume-frontend - if (`$container) { - docker stop resume-frontend - Start-Sleep -Seconds 2 - docker rm resume-frontend - } - - # Build and run new container - Set-Location C:\projects\digital-resume-FE - docker build -t resume-frontend:latest . - docker run -d --name resume-frontend --restart unless-stopped -p 3000:80 resume-frontend:latest - - # Cleanup unused images - docker image prune -f - " + powershell -Command "if (Test-Path 'C:\projects\digital-resume-FE') { Set-Location C:\projects\digital-resume-FE; git pull origin main } else { New-Item -ItemType Directory -Path C:\projects -Force; Set-Location C:\projects; git clone https://gitea.sashabayda.ca/Bayda77/digital-resume-FE.git }" + powershell -Command "docker stop resume-frontend 2>$null; docker rm resume-frontend 2>$null; exit 0" + powershell -Command "Set-Location C:\projects\digital-resume-FE; docker build -t resume-frontend:latest ." + powershell -Command "docker run -d --name resume-frontend --restart unless-stopped -p 3000:80 resume-frontend:latest" + powershell -Command "docker image prune -f"