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