test: verbose
All checks were successful
Deploy to Production / deploy (push) Successful in 2s

This commit is contained in:
2026-01-04 04:37:30 -06:00
parent bc8cae3ea0
commit 6992fd44b9

View File

@@ -15,9 +15,20 @@ jobs:
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
script_stop: true
script: |
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"
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