Removing dev.apps.ad5001.eu
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
57e8d59333
commit
f6547bd2c3
1 changed files with 50 additions and 54 deletions
104
ci/drone.yml
104
ci/drone.yml
|
@ -10,61 +10,53 @@ clone:
|
|||
steps:
|
||||
- name: Initilizing submodules
|
||||
image: alpine/git
|
||||
environment:
|
||||
GIT_ASKPASS: "/bin/git-askpass-from-env"
|
||||
commands:
|
||||
# Installing little script to get git password from environment.
|
||||
- wget https://download.ad5001.eu/other/git-askpass-from-env.sh
|
||||
- mv git-askpass-from-env.sh /bin/git-askpass-from-env
|
||||
- chmod +x /bin/git-askpass-from-env
|
||||
# Changing submodule URL to https://<USERNAME>@git.ad5001.eu/Ad5001/omegamma.git
|
||||
- git submodule init
|
||||
- git config submodule.sub/omegamma.url https://$DRONE_GIT_USERNAME@git.ad5001.eu/Ad5001/omegamma.git
|
||||
# Fetching submodules
|
||||
- git submodule init
|
||||
- git submodule update --init --recursive
|
||||
|
||||
- name: Build dev.apps.ad5001.eu
|
||||
image: xdevbase/hugo-builder:latest
|
||||
commands:
|
||||
- hugo --config ci/dev.config.yml --minify
|
||||
when:
|
||||
event: [push, tag]
|
||||
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
|
||||
settings:
|
||||
host:
|
||||
from_secret: SSH_HOST
|
||||
username:
|
||||
from_secret: SSH_USERNAME
|
||||
password:
|
||||
from_secret: SSH_PASSWORD
|
||||
target:
|
||||
from_secret: DEV_WWW_PATH
|
||||
source: public/*
|
||||
when:
|
||||
event: [push, tag]
|
||||
branch: [master]
|
||||
# - name: Build dev.apps.ad5001.eu
|
||||
# image: xdevbase/hugo-builder:latest
|
||||
# commands:
|
||||
# - hugo --config ci/dev.config.yml --minify
|
||||
# when:
|
||||
# event: [push, tag]
|
||||
# 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
|
||||
# settings:
|
||||
# host:
|
||||
# from_secret: SSH_HOST
|
||||
# username:
|
||||
# from_secret: SSH_USERNAME
|
||||
# password:
|
||||
# from_secret: SSH_PASSWORD
|
||||
# target:
|
||||
# from_secret: DEV_WWW_PATH
|
||||
# source: public/*
|
||||
# when:
|
||||
# event: [push, tag]
|
||||
# branch: [master]
|
||||
|
||||
- name: Build apps.ad5001.eu
|
||||
image: xdevbase/hugo-builder:latest
|
||||
|
@ -72,7 +64,7 @@ steps:
|
|||
- hugo --minify
|
||||
when:
|
||||
event: [push, tag]
|
||||
branch: [prod]
|
||||
branch: [master]
|
||||
|
||||
- name: Remove old apps.ad5001.eu
|
||||
image: appleboy/drone-ssh
|
||||
|
@ -86,6 +78,8 @@ steps:
|
|||
from_secret: SSH_USERNAME
|
||||
password:
|
||||
from_secret: SSH_PASSWORD
|
||||
port:
|
||||
from_secret: SSH_PORT
|
||||
envs:
|
||||
- PROD_WWW_PATH
|
||||
script:
|
||||
|
@ -94,7 +88,7 @@ steps:
|
|||
- rm -rf *
|
||||
when:
|
||||
event: [push, tag]
|
||||
branch: [prod]
|
||||
branch: [master]
|
||||
|
||||
- name: Deploy apps.ad5001.eu
|
||||
image: appleboy/drone-scp
|
||||
|
@ -105,9 +99,11 @@ steps:
|
|||
from_secret: SSH_USERNAME
|
||||
password:
|
||||
from_secret: SSH_PASSWORD
|
||||
port:
|
||||
from_secret: SSH_PORT
|
||||
target:
|
||||
from_secret: PROD_WWW_PATH
|
||||
source: public/*
|
||||
when:
|
||||
event: [push, tag]
|
||||
branch: [prod]
|
||||
branch: [master]
|
||||
|
|
Loading…
Reference in a new issue