Repository navigation
#286 - Update About Us #79
This file contains hidden or 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 PR merge | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - main | |
| jobs: | |
| build_and_deploy: | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.merged == true # Only run if PR is merged | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| # - name: Setup Node.js | |
| # uses: actions/setup-node@v4 | |
| # with: | |
| # node-version: "18" | |
| # cache: "npm" | |
| - name: Install Dependencies | |
| run: npm install | |
| - name: Install Firebase CLI | |
| run: npm install -g firebase-tools | |
| # - name: Install Firebase CLI | |
| # run: npm install -g firebase-tools | |
| - name: Build Project | |
| run: CI=false npm run build | |
| env: | |
| REACT_APP_API_KEY_GAPI: ${{ secrets.REACT_APP_API_KEY_GAPI }} | |
| REACT_APP_CLIENT_ID_GAPI: ${{ secrets.REACT_APP_CLIENT_ID_GAPI }} | |
| - name: Authenticate with Firebase | |
| env: | |
| FIREBASE_SERVICE_ACCOUNT_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }} | |
| run: | | |
| echo "$FIREBASE_SERVICE_ACCOUNT_KEY" > "$HOME/firebase-key.json" | |
| echo "GOOGLE_APPLICATION_CREDENTIALS=$HOME/firebase-key.json" >> $GITHUB_ENV | |
| firebase use --add | |
| - name: Deploy to Firebase | |
| run: firebase deploy --only hosting |