Skip to content

Commit

Permalink
MATE-90 : [CHORE] deploy.yml 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
jooinjoo committed Dec 6, 2024
1 parent f2987f5 commit 53f33a0
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
name: Deploy To EC2
on:
push:
branches:
- develop
push

jobs:
deploy:
runs-on: ubuntu-latest
env:
NAVER_CLIENT_ID: ${{ secrets.NAVER_CLIENT_ID }}
NAVER_REDIRECT_URI: ${{ secrets.NAVER_REDIRECT_URI }}
NAVER_CLIENT_SECRET: ${{ secrets.NAVER_CLIENT_SECRET }}
JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY }}
OPENWEATHER_API_KEY: ${{ secrets.OPENWEATHER_API_KEY }}
steps:
- name: Github Repository 파일 불러오기
uses: actions/checkout@v4
Expand All @@ -24,18 +16,20 @@ jobs:
java-version: 17

- name: application-dev.yml 파일 만들기
run: echo "${{ secrets.APPLICATION_PROPERTIES }}" > ./src/main/resources/application-dev.yml
run: echo "${{ secrets.APPLICATION_PROPERTIES }}" > ./src/main/resources/application.yml

- name: 테스트 및 빌드하기
run: |
chmod +x gradlew
./gradlew clean build
./gradlew clean build -Dspring.profiles.active=dev
- name: AWS Resource에 접근할 수 있게 AWS credentials 설정
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ap-northeast-2
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: ECR에 로그인하기
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
Expand Down

0 comments on commit 53f33a0

Please sign in to comment.