Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub - Firebase deploy working directory

How to specify folder name for the Firebase and GitHub workflows. Basically I have a .github folder where .yml files are stored but I also have frontend folder where I store my React.js src files and everything else that is needed.

Now when I push the changes I get this error:

npm ERR! The `npm ci` command can only install with an existing package-lock.json or
npm ERR! npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
npm ERR! later to generate a package-lock.json file, then try again.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2022-03-29T10_09_41_940Z-debug-0.log

This is my .yml file:

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: npm ci && npm run build
      - uses: FirebaseExtended/action-hosting-deploy@v0
        with:
          repoToken: "${{ secrets.GITHUB_TOKEN }}"
          firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_REACTTASK_20C61 }}"
          channelId: live
          projectId: reacttask-20c61
          workingdirectory: ./frontend

How to make it that my frontend folder is a working directory, beacuse it now seems it is not

enter image description here

like image 346
Samke11 Avatar asked Nov 18 '25 21:11

Samke11


1 Answers

Use the entryPoint option

      - uses: FirebaseExtended/action-hosting-deploy@v0
        with:
          repoToken: "${{ secrets.GITHUB_TOKEN }}"
          firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_REACTTASK_20C61 }}"
          channelId: live
          projectId: reacttask-20c61
          entryPoint: ./frontend

for more details see the docs

like image 69
Micaiah Effiong Avatar answered Nov 21 '25 10:11

Micaiah Effiong