Refactor pipeline script

This commit is contained in:
Murtadha 2024-07-27 21:16:52 -04:00
parent f299a1467e
commit dc780a3ec4

View file

@ -6,7 +6,7 @@ steps:
- npm run build - npm run build
- echo "VERSION=$(cat version.txt)" > .env - echo "VERSION=$(cat version.txt)" > .env
clear-from-host: clear-from-host:
image: appleboy/drone-ssh image: appleboy/drone-ssh
settings: settings:
host: host:
@ -37,8 +37,7 @@ steps:
- dist/ - dist/
- nginx.conf - nginx.conf
- version.txt - version.txt
deploy:
deploy:
image: appleboy/drone-ssh image: appleboy/drone-ssh
settings: settings:
host: host:
@ -68,7 +67,7 @@ steps:
- docker tag nginx:alpine frontend:$VERSION - docker tag nginx:alpine frontend:$VERSION
- echo "Deployment completed" - echo "Deployment completed"
confirm-deployment: confirm-deployment:
image: appleboy/drone-ssh image: appleboy/drone-ssh
settings: settings:
host: host:
@ -98,7 +97,7 @@ steps:
- curl -I http://localhost:5173 || { echo "HTTP request failed"; exit 1; } - curl -I http://localhost:5173 || { echo "HTTP request failed"; exit 1; }
- echo "Deployment confirmed successfully" - echo "Deployment confirmed successfully"
cleanup: cleanup:
image: appleboy/drone-ssh image: appleboy/drone-ssh
settings: settings:
host: host: