Skip to content

Commit dd2c193

Browse files
authored
[infra] 배포 시 ga4-service-account.json파일 처리 (merge 부탁드립니다!) (#209)
* work * work * work * work * work * work * work * work * work * work * work * work * Work * work * work * work * Work * work * Work * work * work * work * work * work * work * work * work * work * work
1 parent 2fb52a3 commit dd2c193

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ jobs:
9292
9393
# GA4 서비스 계정 파일 생성
9494
- name: Create GA4 Service Account Key
95-
run: |
96-
mkdir -p src/main/resources
97-
printf "%s" "${{ secrets.GA4_JSON }}" > src/main/resources/ga4-service-account.json
95+
run: |
96+
mkdir -p src/main/resources
97+
echo "${{ secrets.GA4_JSON }}" | base64 -d > src/main/resources/ga4-service-account.json
9898
9999
- name: Docker Buildx 설치
100100
uses: docker/setup-buildx-action@v3
@@ -249,7 +249,7 @@ jobs:
249249
# 5) 헬스체크 (/actuator/health 200 OK까지 대기))
250250
# ---------------------------------------------------------
251251
echo "⏱ health-check: ${GREEN}"
252-
TIMEOUT=120
252+
TIMEOUT=120
253253
INTERVAL=3
254254
ELAPSED=0
255255
sleep 8 # 초기 부팅 여유

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ dependencies {
4343
annotationProcessor("io.github.openfeign.querydsl:querydsl-apt:7.0:jpa")
4444
annotationProcessor("jakarta.persistence:jakarta.persistence-api:3.1.0")
4545
annotationProcessor("jakarta.annotation:jakarta.annotation-api:2.1.1")
46-
46+
4747
// JWT 의존성 추가
4848
implementation("io.jsonwebtoken:jjwt-api:0.12.3")
4949
implementation("io.jsonwebtoken:jjwt-impl:0.12.3")
@@ -68,4 +68,4 @@ dependencies {
6868

6969
tasks.withType<Test> {
7070
useJUnitPlatform()
71-
}
71+
}

src/main/java/com/back/global/security/config/SecurityConfig.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
7171
.requestMatchers("/v3/api-docs/**", "/swagger-ui/**", "/swagger-ui.html").permitAll()
7272
.requestMatchers("/swagger-resources/**", "/webjars/**").permitAll()
7373

74+
// 헬스 체크 허용
75+
.requestMatchers("/actuator/health").permitAll()
76+
7477
// 정적 리소스
7578
.requestMatchers("/favicon.ico", "/*.html").permitAll()
7679
.requestMatchers("/css/**", "/js/**", "/images/**").permitAll()

src/main/resources/application-prod.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ spring:
1717
hibernate:
1818
dialect: org.hibernate.dialect.PostgreSQLDialect
1919
show-sql: true
20+
analytics:
21+
google:
22+
analytics:
23+
credentials-path: classpath:ga4-service-account.json
2024

2125
logging:
2226
level:

src/main/resources/application.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ spring:
3131
format_sql: true
3232
highlight_sql: true
3333
use_sql_comments: true
34-
# osiv 끄기
35-
open-in-view: false
34+
# osiv 끄기
35+
open-in-view: false
3636
task:
3737
scheduling:
3838
pool:

0 commit comments

Comments
 (0)