Updated config.yml
This commit is contained in:
parent
f9087bc36c
commit
09af134de2
1 changed files with 26 additions and 19 deletions
|
|
@ -2,25 +2,32 @@
|
||||||
# See: https://circleci.com/docs/2.0/configuration-reference
|
# See: https://circleci.com/docs/2.0/configuration-reference
|
||||||
version: 2.1
|
version: 2.1
|
||||||
|
|
||||||
# Define a job to be invoked later in a workflow.
|
|
||||||
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
|
|
||||||
jobs:
|
jobs:
|
||||||
say-hello:
|
clone:
|
||||||
# Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
|
machine:
|
||||||
# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
|
image: "ubuntu-2004:current"
|
||||||
docker:
|
steps:
|
||||||
- image: cimg/base:stable
|
- run:
|
||||||
# Add steps to the job
|
name: Clone
|
||||||
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
|
command: ssh $SSH_USER@$SSH_HOST "cd /etc/BotYam && gh repo sync"
|
||||||
steps:
|
deploy:
|
||||||
- checkout
|
machine:
|
||||||
- run:
|
image: "ubuntu-2004:current"
|
||||||
name: "Say hello"
|
steps:
|
||||||
command: "echo Hello, World!"
|
- 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:
|
workflows:
|
||||||
say-hello-workflow:
|
build-and-deploy:
|
||||||
jobs:
|
jobs:
|
||||||
- say-hello
|
- clone:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: main
|
||||||
|
- deploy:
|
||||||
|
requires:
|
||||||
|
- clone
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: main
|
||||||
Loading…
Reference in a new issue