小编rya*_*tan的帖子

为 Firebase 托管设置 Github 操作时找不到 package.json 文件

当初始化 firebase 托管的 github 操作时,我指定了以下内容:

设置工作流程以在每次部署之前运行构建脚本?是 每次部署之前应运行什么脚本?纱线运行构建。

这个工作流程给了我错误

Run yarn run build
yarn run v1.22.10
error Couldn't find a package.json file in "/home/runner/work/SpaceBar/SpaceBar"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.
Run Code Online (Sandbox Code Playgroud)

我的项目目录中有一个 package.json 文件。为什么说找不到呢?

firebase-hosting-merge.yml 位于名为 spacebar 的目录中,其中包含另一个名为 spacebar 的目录,其中包含 package.json 文件。是否有办法 cd 到该文件的子目录中

name: Deploy to Firebase Hosting on merge
'on':
  push:
    branches:
      - main
jobs:
  build_and_deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: yarn run build
      - uses: FirebaseExtended/action-hosting-deploy@v0
Run Code Online (Sandbox Code Playgroud)

firebase firebase-hosting github-actions

3
推荐指数
1
解决办法
6112
查看次数