simplify action #37
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: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install pnpm | |
| run: npm install -g pnpm | |
| - name: Install Firebase CLI | |
| run: npm install -g firebase-tools | |
| - name: Install Frontend dependencies | |
| run: pnpm install | |
| - uses: 'google-github-actions/auth@v2' | |
| with: | |
| credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_THINGS_TO_COMPLETE }} | |
| - name: Build Frontend | |
| run: pnpm run build | |
| - name: Deploy Frontend to Firebase Hosting | |
| run: | | |
| firebase deploy -f --only hosting --project things-to-complete | |
| - name: Install Functions dependencies | |
| run: npm install | |
| working-directory: ./functions | |
| - name: Deploy functions | |
| run: | | |
| firebase deploy -f --only functions --project things-to-complete |