Follow beset practices
This commit is contained in:
parent
72842c822e
commit
e7c59b77bb
1 changed files with 19 additions and 7 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
|
when:
|
||||||
|
- branch: master
|
||||||
|
event: push
|
||||||
image: node:22
|
image: node:22
|
||||||
commands:
|
commands:
|
||||||
- npm ci
|
- npm ci
|
||||||
|
|
@ -7,6 +10,9 @@ steps:
|
||||||
- echo "VERSION=$(cat version.txt)" > .env
|
- echo "VERSION=$(cat version.txt)" > .env
|
||||||
|
|
||||||
clear-from-host:
|
clear-from-host:
|
||||||
|
when:
|
||||||
|
- branch: master
|
||||||
|
event: push
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
settings:
|
settings:
|
||||||
host:
|
host:
|
||||||
|
|
@ -21,6 +27,9 @@ steps:
|
||||||
- echo "Target directory cleared"
|
- echo "Target directory cleared"
|
||||||
|
|
||||||
copy-to-host:
|
copy-to-host:
|
||||||
|
when:
|
||||||
|
- branch: master
|
||||||
|
event: push
|
||||||
image: appleboy/drone-scp
|
image: appleboy/drone-scp
|
||||||
settings:
|
settings:
|
||||||
host:
|
host:
|
||||||
|
|
@ -37,6 +46,9 @@ steps:
|
||||||
- version.txt
|
- version.txt
|
||||||
|
|
||||||
webserver-deploy:
|
webserver-deploy:
|
||||||
|
when:
|
||||||
|
- branch: master
|
||||||
|
event: push
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
settings:
|
settings:
|
||||||
host:
|
host:
|
||||||
|
|
@ -67,6 +79,9 @@ steps:
|
||||||
- echo "Deployment completed"
|
- echo "Deployment completed"
|
||||||
|
|
||||||
confirm-deployment:
|
confirm-deployment:
|
||||||
|
when:
|
||||||
|
- branch: master
|
||||||
|
event: push
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
settings:
|
settings:
|
||||||
host:
|
host:
|
||||||
|
|
@ -92,6 +107,9 @@ steps:
|
||||||
- echo "Deployment confirmed successfully"
|
- echo "Deployment confirmed successfully"
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
when:
|
||||||
|
- branch: master
|
||||||
|
event: push
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
settings:
|
settings:
|
||||||
host:
|
host:
|
||||||
|
|
@ -111,9 +129,3 @@ steps:
|
||||||
docker rmi frontend:$img || true;
|
docker rmi frontend:$img || true;
|
||||||
done
|
done
|
||||||
- echo "Cleanup completed"
|
- echo "Cleanup completed"
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue