Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

fix: add firebase tools version for node v14 compatibility #1580

fix: add firebase tools version for node v14 compatibility

fix: add firebase tools version for node v14 compatibility #1580

name: Deploy to Firebase Hosting
on:
push:
pull_request:
jobs:
build_and_preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- run: yarn install
- run: npm run docs:build
- name: Generate site name from branch
shell: bash
run: ruby -e 'puts "::set-output name=branch_name::#{`git branch --show-current`.chomp.gsub(/[^a-zA-Z\d]/){"-"}.downcase}"'
id: get_branch
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SA_API3_DOCS }}'
expires: 7d
channelId: ${{ steps.get_branch.outputs.branch_name }}
firebaseToolsVersion: '11.30.0'
id: firebase_deploy
- uses: actions/github-script@v6
name: Comment on commit
if: ${{ github.event_name == 'push' }}
with:
script: |
github.rest.repos.createCommitComment({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: context.sha,
body: 'Preview site: ${{ steps.firebase_deploy.outputs.details_url }}'
})