add firebase cli 11 #26
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: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' # Ensure compatibility with Firebase CLI version 11 | |
- name: Set Node.js options | |
run: export NODE_OPTIONS=--openssl-legacy-provider | |
- name: Install dependencies | |
run: yarn install | |
- name: Build Next.js application | |
run: yarn run build | |
- name: Upgrade Firebase CLI | |
run: npm install -g firebase-tools@11 # Install Firebase CLI version 11 | |
- name: Deploy to Firebase Hosting | |
uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: ${{ secrets.GITHUB_TOKEN }} | |
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_E_COMMERCE_99426 }} | |
channelId: live | |
projectId: e-commerce-99426 |