I'm trying to automate the deployment of a react app to firebase with github actions but i'm getting the following error:
Error: Autorization failed. This account is missing the following required permissions on project ***
firebase.projects.get
firebasehosting.sites.update
I have multiple sites and when I try to deploy manually using firebase deploy --only hosting:MY_SITE_NAME
it's working correctly. I have two jobs in my workflow. The build job passes but the deploy one fails. Here's my workflow file:
name: Build and Deploy to Firebase
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Install Dependencies
run: yarn install
- name: Build
run: yarn build
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: build
path: build
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: build
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting:MY_SITE_NAME
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
Does anyone have an idea of what is wrong?