-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1.46 KB
/
deploy-component.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
name: Deploy Component
on:
workflow_call:
jobs:
init-update:
runs-on: ubuntu-latest
env:
TARGET: DINO
SPRING_BOOT_ADMIN_USERNAME: ${{ secrets.SPRING_BOOT_ADMIN_USERNAME }}
SPRING_BOOT_ADMIN_PASSWORD: ${{ secrets.SPRING_BOOT_ADMIN_PASSWORD }}
SERVER_VOLUME_DIR: ${{ secrets.SERVER_VOLUME_DIR}}
ENV_FILES: service_config/files
steps:
- uses: actions/checkout@v4
- name: Prepare deployment
run: bash -c ./service_config/prepare_deployment.sh
- name: "Deploy on DINO"
if: ${{ env.TARGET == 'DINO' }}
# ssh into server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets. SERVER_HOST }}
port : ${{ secrets.SERVER_PORT }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
# replace server-specific volume dirs
run: sed -i "s/VOLUME_DIR/$SERVER_VOLUME_DIR/g" ./service_config/service_config.json
run: bash -c ./service_config/deploy_components.sh ./service_config/service_config.json
# use MSU to update on SWE
- name: "Deploy on SWE"
if: ${{ env.TARGET == 'SWE' }}
# TODO: replace with specific dir
run: sed -i "s/VOLUME_DIR/$SERVER_VOLUME_DIR/g" ./service_config/service_config.json
uses: WSE-research/[email protected]
with:
api_key: ${{ secrets.API_KEY }}
updater_host: ${{ secrets.UPDATER_HOST }}