Merge pull request #238 from JNU-econovation/feat/remove-active-device #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 # 배포 스크립트 실행 |