-
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (52 loc) · 1.79 KB
/
service-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: service-deploy
on:
workflow_dispatch:
inputs:
service:
description: 'Service to deploy'
type: choice
required: true
default: 'minio'
options:
- minio
- sftp
docker_compose_cmd:
description: 'Run docker compose command'
required: false
default: '--env-file /opt/docker/mlflow/.env up --build -d'
jobs:
deploy-service:
name: Deploy service on workstation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Echo service
run: echo "Deploying the service - ${{ github.event.inputs.service }}"
- name: Rsync repo to workstation
uses: burnett01/[email protected]
with:
switches: -avzr --delete
remote_path: '~/projects/mbl'
remote_host: ${{ secrets.WORKSTATION_HOST }}
remote_user: ${{ secrets.USERNAME }}
remote_key: ${{ secrets.KEY }}
- name: Deploy minio mlflow server on workstation
if: github.event.inputs.service == 'minio'
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.WORKSTATION_HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
cd projects/mbl/mlflow-tracker/minio &&
docker compose ${{ github.event.inputs.docker_compose_cmd }}
- name: Deploy sftp server on workstation
if: github.event.inputs.service == 'sftp'
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.WORKSTATION_HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
cd projects/mbl/mlflow-tracker/aws/sftp &&
docker compose ${{ github.event.inputs.docker_compose_cmd }}