fix(update_service): 컨테이너에서 registry_address.json 경로를 올바르게 참조하도록 수정 및… #2
This file contains hidden or 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 Registry Service | |
| on: | |
| push: | |
| paths: | |
| - 'registry-service/**' | |
| branches: [ main ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Prepare SSH key | |
| run: | | |
| echo "${{ secrets.EC2_KEY }}" | base64 -d > ec2_key.pem | |
| chmod 600 ec2_key.pem | |
| - name: Pull source & restart registry-service, update_service on EC2 | |
| run: | | |
| ssh -i ec2_key.pem -o StrictHostKeyChecking=no ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} "\ | |
| cd ~/blockchain-network && \ | |
| git pull origin main && \ | |
| cd registry-service && \ | |
| docker-compose down || true && \ | |
| docker-compose up -d && \ | |
| cd ../update_service && \ | |
| docker-compose down || true && \ | |
| docker-compose up -d \ | |
| " |