The React project is meant to be hosted on Firebase Hosting service. I followed the instructions and deployed the version I want successfully. It also asked if I wanted to combine the project with Github Workflow. This means that it will pull my project's main branch and merge (automatically deploy) it to firebase, build and finish the deployment.
The issue here is that the React folder is in ./frontend directory, not in the root. The first error that popped up was:
Verifying firebase.json exists
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.
Ass suggestion said I added entrypoint variable to both ...-merge.yml and ...pull-request.yml files:
------
- uses: actions/checkout@v2
- run: cd ./frontend; npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
entrypoint: /frontend
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_LIFT_OS }}"
------
Lately getting the error above, saying that the directory doesn't exist:
Error changing to directory /frontend: Error: ENOENT: no such file or directory, chdir '/home/runner/work/<project-name>/<project-name>' -> '/frontend'
I expect to locate the folder named frontend which has the React project and is in the root directory, without errors. How to locate it properly?