Refactor pipeline script
This commit is contained in:
parent
3daf036a89
commit
c865f926b0
1 changed files with 5 additions and 23 deletions
|
|
@ -5,9 +5,6 @@
|
|||
|
||||
steps:
|
||||
- name: build
|
||||
when:
|
||||
- branch: master
|
||||
event: push
|
||||
image: node:22
|
||||
commands:
|
||||
- npm ci
|
||||
|
|
@ -15,9 +12,6 @@ steps:
|
|||
- echo "VERSION=$(cat version.txt)" > .env
|
||||
|
||||
- name: clear-from-host
|
||||
when:
|
||||
- branch: master
|
||||
event: push
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
host:
|
||||
|
|
@ -34,9 +28,6 @@ steps:
|
|||
- echo "Target directory cleared, resumes folder preserved"
|
||||
|
||||
- name: copy-to-host
|
||||
when:
|
||||
- branch: master
|
||||
event: push
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
host:
|
||||
|
|
@ -53,9 +44,6 @@ steps:
|
|||
- version.txt
|
||||
|
||||
- name: build-and-deploy
|
||||
when:
|
||||
- branch: master
|
||||
event: push
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
host:
|
||||
|
|
@ -83,9 +71,6 @@ steps:
|
|||
- echo "Deployment attempt completed"
|
||||
|
||||
- name: confirm-deployment
|
||||
when:
|
||||
- branch: master
|
||||
event: push
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
host:
|
||||
|
|
@ -116,9 +101,6 @@ steps:
|
|||
- echo "Deployment confirmed successfully"
|
||||
|
||||
- name: cleanup
|
||||
when:
|
||||
- branch: master
|
||||
event: push
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
host:
|
||||
|
|
@ -137,8 +119,8 @@ steps:
|
|||
done
|
||||
- echo "Cleanup completed"
|
||||
|
||||
# trigger:
|
||||
# branch:
|
||||
# - master
|
||||
# event:
|
||||
# - push
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue