This commit is contained in:
5
.github/workflows/deploy.yml
vendored
5
.github/workflows/deploy.yml
vendored
@@ -17,7 +17,6 @@ jobs:
|
||||
passphrase: ${{ secrets.SSH_PASSPHRASE }}
|
||||
script_shell: pwsh
|
||||
script: |
|
||||
# Navigate to project directory or clone if it doesn't exist
|
||||
if (Test-Path "C:\projects\digital-resume-FE") {
|
||||
Set-Location C:\projects\digital-resume-FE
|
||||
git pull origin main
|
||||
@@ -28,7 +27,6 @@ jobs:
|
||||
Set-Location digital-resume-FE
|
||||
}
|
||||
|
||||
# Stop and remove existing container if it exists
|
||||
$container = docker ps -a -q -f name=resume-frontend
|
||||
if ($container) {
|
||||
docker stop resume-frontend
|
||||
@@ -36,11 +34,8 @@ jobs:
|
||||
docker rm resume-frontend
|
||||
}
|
||||
|
||||
# Build the Docker image
|
||||
docker build -t resume-frontend:latest .
|
||||
|
||||
# Run new container
|
||||
docker run -d --name resume-frontend --restart unless-stopped -p 3000:80 resume-frontend:latest
|
||||
|
||||
# Cleanup unused images
|
||||
docker image prune -f
|
||||
|
||||
Reference in New Issue
Block a user