Improved pipeline.yml

This commit is contained in:
Administrator 2022-03-27 10:08:43 +02:00
parent 67c8fe9343
commit b3f76ec8bf

View File

@ -17,6 +17,23 @@ pipeline:
from_secret: registry
dockerfile: api/Dockerfile
platforms: linux/amd64
when:
path: "api/*"
deploy_api:
image: appleboy/drone-ssh
network_mode: host
settings:
host:
from_secret: ssh_host
username:
from_secret: ssh_user
password:
from_secret: ssh_password
script:
- /opt/docker/TelegramAktienBot/deploy_api.sh
when:
path: "api/*"
build_bot:
image: woodpeckerci/plugin-docker-buildx
@ -31,6 +48,23 @@ pipeline:
from_secret: registry
dockerfile: telegram_bot/Dockerfile
platforms: linux/amd64
when:
path: "telegram_bot/*"
deploy_bot:
image: appleboy/drone-ssh
network_mode: host
settings:
host:
from_secret: ssh_host
username:
from_secret: ssh_user
password:
from_secret: ssh_password
script:
- /opt/docker/TelegramAktienBot/deploy_bot.sh
when:
path: "telegram_bot/*"
build_frontend:
image: woodpeckerci/plugin-docker-buildx
@ -45,8 +79,10 @@ pipeline:
from_secret: registry
dockerfile: frontend/Dockerfile
platforms: linux/amd64
when:
path: "frontend/*"
deploy:
deploy_frontend:
image: appleboy/drone-ssh
network_mode: host
settings:
@ -57,6 +93,8 @@ pipeline:
password:
from_secret: ssh_password
script:
- /opt/docker/TelegramAktienBot/deploy.sh
- /opt/docker/TelegramAktienBot/deploy_frontend.sh
when:
path: "frontend/*"
branches: main