This commit is contained in:
parent
41822ba3da
commit
ca90eb5373
1 changed files with 43 additions and 2 deletions
45
ci/drone.yml
45
ci/drone.yml
|
@ -28,7 +28,26 @@ steps:
|
|||
- hugo -b https://dev.apps.ad5001.eu
|
||||
when:
|
||||
event: [ push, tag ]
|
||||
branch: [ main ]
|
||||
branch: [ master ]
|
||||
|
||||
- name: Remove old dev.apps.ad5001.eu
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
host:
|
||||
from_secret: SSH_HOST
|
||||
username:
|
||||
from_secret: SSH_USERNAME
|
||||
password:
|
||||
from_secret: SSH_PASSWORD
|
||||
envs:
|
||||
- DEV_WWW_PATH
|
||||
script:
|
||||
- export DEV_WWW_PATH=$DEV_WWW_PATH
|
||||
- cd "$DEV_WWW_PATH"
|
||||
- rm -rf *
|
||||
when:
|
||||
event: [ push, tag ]
|
||||
branch: [ master ]
|
||||
|
||||
- name: Deploy dev.apps.ad5001.eu
|
||||
image: appleboy/drone-scp
|
||||
|
@ -44,7 +63,7 @@ steps:
|
|||
source: public/*
|
||||
when:
|
||||
event: [ push, tag ]
|
||||
branch: [ main ]
|
||||
branch: [ master ]
|
||||
|
||||
- name: Build apps.ad5001.eu
|
||||
image: xdevbase/hugo-builder:latest
|
||||
|
@ -54,6 +73,28 @@ steps:
|
|||
event: [ push, tag ]
|
||||
branch: [ prod ]
|
||||
|
||||
- name: Remove old apps.ad5001.eu
|
||||
image: appleboy/drone-ssh
|
||||
environment:
|
||||
PROD_WWW_PATH:
|
||||
from_secret: PROD_WWW_PATH
|
||||
settings:
|
||||
host:
|
||||
from_secret: SSH_HOST
|
||||
username:
|
||||
from_secret: SSH_USERNAME
|
||||
password:
|
||||
from_secret: SSH_PASSWORD
|
||||
envs:
|
||||
- PROD_WWW_PATH
|
||||
script:
|
||||
- export DEV_WWW_PATH=$DEV_WWW_PATH
|
||||
- cd "$PROD_WWW_PATH"
|
||||
- rm -rf *
|
||||
when:
|
||||
event: [ push, tag ]
|
||||
branch: [ prod ]
|
||||
|
||||
- name: Deploy apps.ad5001.eu
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
|
|
Loading…
Reference in a new issue