update github workflow to deploy api server #1
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 EC2 | |
on: | |
push: | |
branches: [ "master" ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest # 실행될 인스턴스 OS와 버전 | |
steps: | |
- name: executing remote ssh commands using password | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.KEY }} | |
port: ${{ secrets.PORT }} | |
script: | | |
cd /home/ec2-user/board-of-audit-and-inspection-system | |
git pull origin master | |
docker-compose up -d --build |