Merge pull request #29 from TEAM-WHEN-WILL-WE-MEET/develop #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Firebase Hosting on merge | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# .env 파일 생성 | |
- name: Create .env file | |
run: | | |
echo "REACT_APP_WWWM_BE_ENDPOINT=${{ secrets.REACT_APP_WWWM_BE_ENDPOINT }}" >> .env | |
echo "REACT_APP_WWWM_BE_DEV_EP=${{ secrets.REACT_APP_WWWM_BE_DEV_EP }}" >> .env | |
# Node.js 설치 및 프로젝트 의존성 설치 | |
- name: Install dependencies | |
run: npm ci | |
# 빌드 실행 | |
- name: Build the project | |
run: npm run build | |
# Firebase 배포 | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: ${{ secrets.GITHUB_TOKEN }} | |
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_WHEN_WILL_WE_MEET_5C1D0 }} | |
channelId: live | |
projectId: when-will-we-meet-5c1d0 |