Skip to content

Merge pull request #238 from JNU-econovation/feat/remove-active-device #9

Merge pull request #238 from JNU-econovation/feat/remove-active-device

Merge pull request #238 from JNU-econovation/feat/remove-active-device #9

name: Deploy to Raspberry Pi Server on Merge
on:
push:
branches:
- develop # develop ???? merge(push)? ? ??
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Deploy to main-api
uses: appleboy/[email protected] # SSH
with:
host: ${{ secrets.MAIN_API_ADDRESS }}
username: ${{ secrets.MAIN_API_USERNAME }}
password: ${{ secrets.MAIN_API_PASSWORD }}
port: ${{ secrets.MAIN_API_SSH_PORT }}
script: |
cd /home/whozin/Whoz-in-BE/modules/main-api/docker # 프로젝트 폴더로 이동
git fetch origin # branch 이력 가져오기
git reset --hard origin/develop # develop branch로 이동
./build-and-deploy.sh # 배포 스크립트 실행