Skip to content

Commit

Permalink
fix: 배포 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
char-yb committed Aug 5, 2024
1 parent 2e1fd0e commit f8f02dd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/develop-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
java-version: [ 17 ]
distribution: [ 'zulu' ]
distribution: [ 'temurin' ]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -47,25 +47,14 @@ jobs:
# 서버로 docker-compose 파일 전송
- name: Copy docker-compose file to EC2
uses: burnett01/[email protected]
with:
switches: -avzr --delete
remote_host: ${{ secrets.EC2_HOST }}
remote_user: ${{ secrets.EC2_USERNAME }}
remote_key: ${{ secrets.EC2_PRIVATE_KEY }}
path: docker-compose.yaml
# root path
remote_path: /home/ec2-user/
run: |
rsync -avzr --delete -e "ssh -i ${{ secrets.EC2_PRIVATE_KEY }}" docker-compose.yaml ${{ secrets.EC2_USERNAME }}@${{ secrets.EC2_HOST }}:/home/ec2-user/
ssh -i ${{ secrets.EC2_PRIVATE_KEY }} ${{ secrets.EC2_USERNAME }}@${{ secrets.EC2_HOST }} "sudo mv /home/ec2-user/docker-compose.yaml /root/"
- name: Copy default.conf to EC2
uses: burnett01/[email protected]
with:
switches: -avzr --delete
remote_host: ${{ secrets.EC2_HOST }}
remote_user: ${{ secrets.EC2_USERNAME }}
remote_key: ${{ secrets.EC2_PRIVATE_KEY }}
path: ./nginx
remote_path: /home/ec2-user/
run: |
rsync -avzr --delete -e "ssh -i ${{ secrets.EC2_PRIVATE_KEY }}" ./nginx ${{ secrets.EC2_USERNAME }}@${{ secrets.EC2_HOST }}:/home/ec2-user/
ssh -i ${{ secrets.EC2_PRIVATE_KEY }} ${{ secrets.EC2_USERNAME }}@${{ secrets.EC2_HOST }} "sudo mv /home/ec2-user/nginx /root/"
- name: Current Time
uses: gerred/[email protected]
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/production-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
matrix:
java-version: [ 17 ]
distribution: [ 'temurin' ]

steps:
# 기본 체크아웃
- name: Checkout
Expand Down Expand Up @@ -75,7 +74,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: linux/arm64
push: true
tags: ${{ steps.metadata.outputs.tags }}

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM azul/zulu-openjdk:17-latest
FROM eclipse-temurin:17
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]

0 comments on commit f8f02dd

Please sign in to comment.