dcsil / dream-team

Team repository for Dream Team
https://dreamtune-cdf8a.web.app/auth/login
0 stars 1 forks source link

Add continuous deployment to firebase #132

Closed RyanMarten closed 4 years ago

RyanMarten commented 4 years ago

Edit react_app.yml to add this functionality. Should only deploy if it passes tests.

ribhav99 commented 4 years ago

Automatic deployment when we push to master too?

RyanMarten commented 4 years ago

adding comment to firebase deploy with the SHA of the git commit https://github.community/t5/GitHub-Actions/Accessing-commit-message-in-pull-request-event/td-p/40856

https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context

RyanMarten commented 4 years ago

Using this github action to help out: https://github.com/marketplace/actions/github-action-for-firebase

RyanMarten commented 4 years ago

Actually the answer was to install firebase-tools globally using npm install -g firebase-tools

Used my own action instead of the one that is out there --> the other one added 30 seconds of wait time.... not great

    - name: Install Firebase Tools
      run: npm install -g firebase-tools
      working-directory: app
    - name: Deploy to firebase
      working-directory: app
      run: firebase deploy --token $FIREBASE_TOKEN -m $SHA
      env:
        FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
        SHA: ${{ github.sha}}