From 09af134de2639b554e1540417db3c216a69cce18 Mon Sep 17 00:00:00 2001 From: Lucy Joshua <43093984+notBscalE@users.noreply.github.com> Date: Sat, 25 Feb 2023 01:20:57 +0200 Subject: [PATCH] Updated config.yml --- .circleci/config.yml | 45 +++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6554e1f..1ca7254 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,25 +2,32 @@ # See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: - say-hello: - # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor - docker: - - image: cimg/base:stable - # Add steps to the job - # See: https://circleci.com/docs/2.0/configuration-reference/#steps - steps: - - checkout - - run: - name: "Say hello" - command: "echo Hello, World!" + clone: + machine: + image: "ubuntu-2004:current" + steps: + - run: + name: Clone + command: ssh $SSH_USER@$SSH_HOST "cd /etc/BotYam && gh repo sync" + deploy: + machine: + image: "ubuntu-2004:current" + steps: + - run: + name: Deploy Over SSH + command: ssh $SSH_USER@$SSH_HOST "cd /etc/BotYam && docker-compose up -d --build" -# Invoke jobs via workflows -# See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: - say-hello-workflow: - jobs: - - say-hello + build-and-deploy: + jobs: + - clone: + filters: + branches: + only: main + - deploy: + requires: + - clone + filters: + branches: + only: main \ No newline at end of file