43 lines
No EOL
1.1 KiB
YAML
43 lines
No EOL
1.1 KiB
YAML
# Use the latest 2.1 version of CircleCI pipeline process engine.
|
|
# See: https://circleci.com/docs/2.0/configuration-reference
|
|
version: 2.1
|
|
|
|
workflows:
|
|
clone-and-run:
|
|
jobs:
|
|
- clone
|
|
#filters:
|
|
# branches:
|
|
# only: main
|
|
- deploy
|
|
#requires:
|
|
# - clone
|
|
#filters:
|
|
# branches:
|
|
# only: main
|
|
|
|
jobs:
|
|
clone:
|
|
machine:
|
|
image: "ubuntu-2004:current"
|
|
steps:
|
|
- add_ssh_keys:
|
|
fingerprints:
|
|
- "b7:39:6c:c8:a1:24:72:26:e6:a8:d1:c6:0d:24:82:a6"
|
|
- run:
|
|
name: Clone
|
|
command: |
|
|
echo $SSH_KEY > pkey
|
|
ssh -i pkey $SSH_USER@$SSH_HOST "cd /etc/BotYam && gh repo sync"
|
|
deploy:
|
|
machine:
|
|
image: "ubuntu-2004:current"
|
|
steps:
|
|
- add_ssh_keys:
|
|
fingerprints:
|
|
- "b7:39:6c:c8:a1:24:72:26:e6:a8:d1:c6:0d:24:82:a6"
|
|
- run:
|
|
name: Deploy Over SSH
|
|
command: |
|
|
echo $SSH_KEY > pkey
|
|
ssh -i pkey $SSH_USER@$SSH_HOST "cd /etc/BotYam && docker-compose up -d --build" |