action-hosting-deploy
action-hosting-deploy copied to clipboard
[BUG] firebase.json file not found
Action config
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
{
"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
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?
any advice or suggestion? Do you require me to document something else in my issue?
Is this still happening? Maybe setting entryPoint: "."
could help? Everything seems set up correctly from here though.
Hey @AlonsoK28. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
any advice or suggestion? Do you require me to document something else in my issue?
I have the same issue when trying to deploy a Flutter Web App. Generated the firebase.json file trough Firebase CLI and placed it in the root of my repo. All works fine up until deploy, then it says:
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.
This is my full code:
name: Build and deploy to Firebase Hosting
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: 'Run flutter pub get'
run: flutter pub get
- name: 'Run Build'
run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Enable flutter web
run: flutter config --enable-web
- name: 'Build Web App'
run: flutter build web
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: web-build
path: build/web
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
entryPoint: .
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_<MY-PROJECT> }}'
channelId: live
projectId: <my-project>
any advice or suggestion? Do you require me to document something else in my issue?
I have the same issue when trying to deploy a Flutter Web App. Generated the firebase.json file trough Firebase CLI and placed it in the root of my repo. All works fine up until deploy, then it says:
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.
This is my full code:
name: Build and deploy to Firebase Hosting on: push: branches: - main jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: channel: 'stable' - name: 'Run flutter pub get' run: flutter pub get - name: 'Run Build' run: flutter packages pub run build_runner build --delete-conflicting-outputs - name: Enable flutter web run: flutter config --enable-web - name: 'Build Web App' run: flutter build web - name: Archive Production Artifact uses: actions/upload-artifact@master with: name: web-build path: build/web deploy: name: Deploy needs: build runs-on: ubuntu-latest steps: - uses: FirebaseExtended/action-hosting-deploy@v0 with: entryPoint: . repoToken: '${{ secrets.GITHUB_TOKEN }}' firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_<MY-PROJECT> }}' channelId: live projectId: <my-project>
In my case I have moved my frontend deploy to vercel
I am also having this issue when i connect my firebase with react. As this is my first project using firebase, i followed the steps but the console shows the error : "Error: It looks like you haven't used Cloud Firestore in this project before. Go to https://console.firebase.google.com/project/instagram-clone-007-vitejs/firestore to create your Cloud Firestore database."