小编Mer*_*rha的帖子

在 Github Actions 中部署 Firebase 会出现授权失败错误

我正在尝试使用 github 操作自动将 React 应用程序部署到 firebase,但出现以下错误:

Error: Autorization failed. This account is missing the following required permissions on project ***
 firebase.projects.get
 firebasehosting.sites.update
Run Code Online (Sandbox Code Playgroud)

我有多个站点,当我尝试使用它手动部署时,firebase deploy --only hosting:MY_SITE_NAME它工作正常。我的工作流程中有两份工作。构建作业通过,但部署作业失败。这是我的工作流程文件:

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 …
Run Code Online (Sandbox Code Playgroud)

firebase firebase-cli github-actions

5
推荐指数
1
解决办法
8349
查看次数

标签 统计

firebase ×1

firebase-cli ×1

github-actions ×1