Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KimMinWoooo committed Sep 4, 2024
1 parent 1aa40b3 commit c788394
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,23 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

# 2. JDK 설치
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'adopt'

# 3. Gradle 빌드
- name: Build with Gradle
run: ./gradlew build

- name: Login to Docker Hub
run: echo $DOCKER_HUB_PASSWORD | docker login -u $DOCKER_HUB_USERNAME --password-stdin

# Frontend 빌드 및 S3 배포
# - name: Build and deploy Frontend
# run: |
# cd frontend
# npm ci
# npm run build
# aws s3 sync build/ s3://${{ secrets.S3_BUCKET }} --delete
# aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"

# Backend, AI, Crawling 이미지 빌드 및 푸시
- name: Build and push Docker images
run: |
docker build -t $DOCKER_HUB_USERNAME/backend:latest ./backend
# docker build -t $DOCKER_HUB_USERNAME/ai:latest ./ai
docker push $DOCKER_HUB_USERNAME/backend:latest
# docker push $DOCKER_HUB_USERNAME/ai:latest
# Backend 서비스 배포 (AWS Systems Manager 사용)
- name: Deploy Backend services
run: |
aws ssm send-command \
Expand All @@ -72,10 +57,6 @@ jobs:
]
}'
- name: Cleanup
if: always()
run: |
docker logout
rm -f /tmp/ec2_key
run: docker logout

0 comments on commit c788394

Please sign in to comment.