Skip to content

Commit

Permalink
Merge pull request #163 from APPS-sookmyung/dev
Browse files Browse the repository at this point in the history
[Fix] ssh 설정 추가
  • Loading branch information
ajung7038 authored Dec 24, 2024
2 parents 3464f83 + f96763c commit 40c44ff
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,14 @@ jobs:
sudo docker run -d -p 8080:8080 ${{ secrets.DOCKER_USERNAME }}/wellet
sudo docker image prune -f
- name: SSH into EC2 and run docker-compose
- name: Set up SSH key
run: |
ssh -o StrictHostKeyChecking=no -i ${{ secrets.PRIVATE_KEY }} ubuntu@${{ secrets.HOST }} <<EOF
echo "${{ secrets.PRIVATE_KEY }}" > /tmp/private-key.pem
chmod 600 /tmp/private-key.pem
- name: Run docker-compose
run: |
ssh -o StrictHostKeyChecking=no -i /tmp/private-key.pem ubuntu@${{ secrets.HOST }} <<EOF
cd ~
docker-compose pull
docker-compose up -d
Expand Down

0 comments on commit 40c44ff

Please sign in to comment.