Deploy to EC2 #26
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: | |
workflow_run: | |
workflows: [Automatic Testing] | |
types: | |
- completed | |
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 |