Skip to content

Commit

Permalink
추가:ㄹ
Browse files Browse the repository at this point in the history
  • Loading branch information
rrosiee committed Jul 10, 2024
1 parent 694812b commit c1c4cd7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,26 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

# Step 6: Deploy to EC2 instance
- name: Run SSH Command
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_INSTANCE_IP }}
username: ec2-user
key: ${{ secrets.EC2_SSH_KEY }}
port: 22
script: |
export DATABASE_URL=${{ secrets.DATABASE_URL }}
CONFIG_FILE=/path/to/your/config/file
if [ ! -f $CONFIG_FILE ]; then
echo "설정 파일을 찾을 수 없습니다!"
exit 1
fi
docker pull public.ecr.aws/h7p2f6d8/ticats_ai:latest
echo ls
docker-compose down
docker-compose up -d
# Step 2: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand Down Expand Up @@ -55,5 +75,6 @@ jobs:
script: |
export DATABASE_URL=${{ secrets.DATABASE_URL }}
docker pull public.ecr.aws/h7p2f6d8/ticats_ai:latest
echo ls
docker-compose down
docker-compose up -d

0 comments on commit c1c4cd7

Please sign in to comment.