Feature/refactor code (#164) #35
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 on merge PR to "main" branch | |
env: | |
CI: "" | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npm install | |
- run: echo "${{ secrets.DOT_ENV }}" > .env # create .env file to use in build | |
- run: npm run build | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_MENDISPHERE }}' # refer to this https://github.com/FirebaseExtended/action-hosting-deploy/blob/main/docs/service-account.md | |
channelId: live | |
projectId: mindbetter-bettersg |