From b3f76ec8bf7edf55857b3e7597d601f3a7f5a71b Mon Sep 17 00:00:00 2001 From: H4CK3R-01 Date: Sun, 27 Mar 2022 10:08:43 +0200 Subject: [PATCH] Improved pipeline.yml --- .woodpecker/pipeline.yml | 44 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/.woodpecker/pipeline.yml b/.woodpecker/pipeline.yml index 84edc74..e2406ae 100644 --- a/.woodpecker/pipeline.yml +++ b/.woodpecker/pipeline.yml @@ -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,7 +48,24 @@ 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 settings: @@ -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