Update firebase-hosting-merge.yml #33
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: alpine | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '17' # Use a stable LTS version like 14.x or 16.x | |
- 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@latest | |
- name: Deploy to Firebase Hosting | |
uses: FirebaseExtended/action-hosting-deploy@latest | |
with: | |
repoToken: ${{ secrets.GITHUB_TOKEN }} | |
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_E_COMMERCE_99426 }} | |
channelId: live | |
projectId: e-commerce-99426 |