diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2fce001..ba73b05 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,20 +15,5 @@ jobs: username: ${{ secrets.REMOTE_USER }} key: ${{ secrets.SSH_PRIVATE_KEY }} passphrase: ${{ secrets.SSH_PASSPHRASE }} - script_stop: true script: | - echo "=== Starting deployment ===" - echo "=== Step 1: Clone/Update repo ===" - cd C:\projects\digital-resume-FE 2>nul && git pull origin main || (mkdir C:\projects 2>nul & cd C:\projects & git clone https://gitea.sashabayda.ca/Bayda77/digital-resume-FE.git) - echo "=== Step 2: Stop existing container ===" - docker stop resume-frontend 2>nul - docker rm resume-frontend 2>nul - echo "=== Step 3: Build Docker image ===" - cd C:\projects\digital-resume-FE - docker build -t resume-frontend:latest . - echo "=== Step 4: Run container ===" - docker run -d --name resume-frontend --restart unless-stopped -p 3000:80 resume-frontend:latest - echo "=== Step 5: Cleanup ===" - docker image prune -f - echo "=== Step 6: Verify ===" - docker ps -a --filter name=resume-frontend + powershell -ExecutionPolicy Bypass -Command "Write-Host '=== Starting deployment ==='; 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 }; Write-Host '=== Stopping container ==='; docker stop resume-frontend; docker rm resume-frontend; Write-Host '=== Building image ==='; Set-Location 'C:\projects\digital-resume-FE'; docker build -t resume-frontend:latest .; Write-Host '=== Running container ==='; docker run -d --name resume-frontend --restart unless-stopped -p 3000:80 resume-frontend:latest; Write-Host '=== Verifying ==='; docker ps -a --filter name=resume-frontend"