feat(ci/cd): deploy controller via ssh
This commit is contained in:
parent
32cf4324af
commit
2ea567d7d7
|
|
@ -36,20 +36,21 @@ jobs:
|
||||||
command: |
|
command: |
|
||||||
cd frontend/ && npm i && npm run build
|
cd frontend/ && npm i && npm run build
|
||||||
|
|
||||||
# deploy_to_server:
|
deploy_controller:
|
||||||
# executor: nodejs
|
machine:
|
||||||
# steps:
|
image: ubuntu-2004:202010-01
|
||||||
# - checkout
|
steps:
|
||||||
# - add_ssh_keys:
|
- run:
|
||||||
# fingerprints:
|
name: Send Binary to Server
|
||||||
# - "YOUR_SSH_KEY_FINGERPRINT"
|
command: |
|
||||||
# - run:
|
scp backend/services/controller/controller $SSH_USER@$SSH_HOST:/home/$SSH_USER
|
||||||
# name: Deploy Apps to Server
|
ssh $SSH_USER@$SSH_HOST
|
||||||
# command: |
|
- run:
|
||||||
# scp -r app1/ user@your-server-ip:/path/to/destination/
|
name: Restart Services
|
||||||
# scp -r app2/ user@your-server-ip:/path/to/destination/
|
command: |
|
||||||
# scp -r app3/ user@your-server-ip:/path/to/destination/
|
sudo su
|
||||||
|
mv controller /usr/bin/
|
||||||
|
systemctl restart controller
|
||||||
workflows:
|
workflows:
|
||||||
build_and_deploy:
|
build_and_deploy:
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -65,11 +66,9 @@ workflows:
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
only: dev
|
only: dev
|
||||||
# - deploy_to_server:
|
- deploy_controller:
|
||||||
# requires:
|
requires:
|
||||||
# - build_controller
|
- build_controller
|
||||||
# - build_mochi
|
filters:
|
||||||
# - build_frontend
|
branches:
|
||||||
# filters:
|
only: dev
|
||||||
# branches:
|
|
||||||
# only: dev
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user