FirebaseExtended / FirebaseExtended/action-hosting-deploy

[BUG] firebase.json file not found

Open
#211 6 comments 0 reactions 0 assignees View on GitHub
bug Needs: Attention
Dominant language
TypeScript
Stars
809
Forks
232
PR merge metrics
No merged PRs in 30d

Description

### Action config

```file.yml
name: bundle amzmation pipeline CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

run-test-app:

# make test app steps

bundle-and-release-app:

# make bundle and release steps

firebase-hosting-deploy-app:

needs: bundle-and-release-app

runs-on: windows-latest

strategy:
matrix:
node-version: [16.x]

steps:
- name: Deploy amazmation-app to firebase-hosting
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_AMAZMATION }}'
projectId: amazmation
```

my `firebase.json ` file is on the root of the proyect

```firebase.json
{
"hosting": {
"public": "./dist/amzmationApp",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}

```

### Error message

`Error: firebase.json file not found. If your firebase.json file is not in the root of your repo, edit the entryPoint option of this GitHub action.`

Also Ive tried move my `firebase.json` in diferent paths using `entryPoint` property, and also shows a relate message error

```file.yml
steps:
- name: Deploy amazmation-app to firebase-hosting
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_AMAZMATION }}'
projectId: amazmation
entryPoint: "config/firebase.json"
```

```
// put into config/firebase.json and also throws error
Error: Error changing to directory config/firebase.json: Error: ENOENT: no such file or directory, chdir 'D:\a\amzmation-app\amzmation-app' -> 'config/firebase.json'
```

```
// try specify root project path and also throws error
Error: Error changing to directory /firebase: Error: ENOENT: no such file or directory, chdir 'D:\a\amzmation-app\amzmation-app' -> '/firebase'
```

### Expected behavior

found `firebase.json` file at the root of my projecy and then deploy app into firebase hosting correctly

### Actual behavior

it throws `"no found file error"`, this can be caused by run the action on `windows` environment?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.