Skip to content

Commit

Permalink
Merge pull request #36 from VOM-Project/feature/fcm
Browse files Browse the repository at this point in the history
fix: delete Firebase Admin SDK JSON file for test
  • Loading branch information
okodeee authored Jun 11, 2024
2 parents 0f00cf0 + 7a0a21d commit 7a81656
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 7a81656

Please sign in to comment.