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 c1c4cd7 commit 1c3c1b4
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,6 @@ 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 All @@ -52,6 +32,21 @@ jobs:
run: |
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
# 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 }}
docker pull public.ecr.aws/h7p2f6d8/ticats_ai:latest
echo ls
docker-compose down
docker-compose up -d
# Step 5: Build and push Docker image to Amazon ECR
- name: Build and push Docker image
id: build-image
Expand Down

0 comments on commit 1c3c1b4

Please sign in to comment.