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
|
||||
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
|
||||
Loading…
Reference in a new issue