diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9ad37d0..b82b75f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -59,19 +59,15 @@ jobs: env: FIREBASE_ADMIN_SDK: ${{ secrets.FIREBASE_ADMIN_SDK }} run: | - mkdir -p firebase - echo "$FIREBASE_ADMIN_SDK" > firebase/vomvom-fd09b-firebase-adminsdk-ghtjs-0070b39a4e.json - env: - FIREBASE_CONFIG_PATH: firebase/vomvom-fd09b-firebase-adminsdk-ghtjs-0070b39a4e.json - # 3) gradlew 권한 설정 + mkdir -p src/main/firebase/resources/firebase + echo "$FIREBASE_ADMIN_SDK" > src/main/firebase/resources/firebase/vomvom-fd09b-firebase-adminsdk-ghtjs-0070b39a4e.json + # 3) gradlew 권한 설정 - name: Grant execute permission for gradlew run: chmod +x gradlew # working-directory: ${{ env.working-directory }} # 4) test 제외 gradle 빌드 - name: Build with Gradle run: ./gradlew clean build -x test - env: - FIREBASE_CONFIG_PATH: firebase/vomvom-fd09b-firebase-adminsdk-ghtjs-0070b39a4e.json # working-directory: ${{ env.working-directory }} # 5) AWS 인증 - name: Configure AWS credentials diff --git a/src/main/java/vom/spring/domain/webpush/service/FcmService.java b/src/main/java/vom/spring/domain/webpush/service/FcmService.java index 44463bf..26e36d4 100644 --- a/src/main/java/vom/spring/domain/webpush/service/FcmService.java +++ b/src/main/java/vom/spring/domain/webpush/service/FcmService.java @@ -88,10 +88,7 @@ public int sendMessageTo(Long memberId) throws IOException { */ private String getAccessToken() throws IOException { - String firebaseConfigPath = System.getenv("FIREBASE_CONFIG_PATH"); - if (firebaseConfigPath == null) { - firebaseConfigPath = "firebase/vomvom-fd09b-firebase-adminsdk-ghtjs-0070b39a4e.json"; - } + String firebaseConfigPath = "firebase/vomvom-fd09b-firebase-adminsdk-ghtjs-0070b39a4e.json"; GoogleCredentials googleCredentials = GoogleCredentials .fromStream(new ClassPathResource(firebaseConfigPath).getInputStream())