Add prod deployment pipeline
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
e8baaa0507
commit
b3eb3c6e80
37
.drone.yml
37
.drone.yml
@ -59,6 +59,43 @@ steps:
|
|||||||
event: promote
|
event: promote
|
||||||
target: staging
|
target: staging
|
||||||
|
|
||||||
|
# =============== DEPLOY TO PROD SITE ===============
|
||||||
|
- name: copy artifacts to production site
|
||||||
|
image: appleboy/drone-scp
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: prod_site_host
|
||||||
|
username:
|
||||||
|
from_secret: prod_site_user
|
||||||
|
key:
|
||||||
|
from_secret: prod_site_key
|
||||||
|
port: 22
|
||||||
|
source: build.tar.gz
|
||||||
|
target: /etc/glmdev/noded-prod
|
||||||
|
when:
|
||||||
|
event: promote
|
||||||
|
target: staging
|
||||||
|
- name: deploy artifacts on staging site
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: prod_site_host
|
||||||
|
username:
|
||||||
|
from_secret: prod_site_user
|
||||||
|
key:
|
||||||
|
from_secret: prod_site_key
|
||||||
|
port: 22
|
||||||
|
script:
|
||||||
|
- cd /etc/glmdev/noded-prod
|
||||||
|
- rm -rf www
|
||||||
|
- tar xzf build.tar.gz
|
||||||
|
- cd www
|
||||||
|
- sed -i 's/<base href="\\/" \\/>/<base href="\\/i\\/"\\/>/' index.html
|
||||||
|
- sed -i 's/Ionic App/Noded/' index.html
|
||||||
|
when:
|
||||||
|
event: promote
|
||||||
|
target: production
|
||||||
|
|
||||||
# =============== NOTIFICATIONS ===============
|
# =============== NOTIFICATIONS ===============
|
||||||
- name: send success notifications
|
- name: send success notifications
|
||||||
image: plugins/webhook
|
image: plugins/webhook
|
||||||
|
Loading…
Reference in New Issue
Block a user