dpl icon indicating copy to clipboard operation
dpl copied to clipboard

unable to find firebase hosting public directory

Open jenishngl opened this issue 4 years ago • 2 comments

I have setup firebase deployment in travis.yml as below

deploy:
  provider: firebase
env:
  secure:<SECURE_KEY>

I can see the Firebase token getting set properly in logs as below

Setting environment variables from .travis.yml
$ export FIREBASE_TOKEN=[secure]

But it is not able to find the public directory for firebase deployment. Got the below error

Error: Specified public directory 'public' does not exist, can't deploy hosting to site

I did a debug and ran necessary scripts like travis_run_before_script, travis_run_script, etc., to verify if the public folder exists. Below is the output of ls

travis@travis-job-79c69886-1ad5-417d-9ea0-0278ad8e61c7:~/build/<PROJECT_FOLDER>$ ls
firebase.json  node_modules  package.json  package-lock.json  public  Readme.md  src

My firebase.json

{
  "hosting": {
    "public": "public",
    .....
    .....

jenishngl avatar Oct 02 '20 07:10 jenishngl

I logged back into debug mode and ran the necessary scripts travis_run_before_script, travis_run_script.

Then ran

gem install dpl --pre
dpl firebase --token $FIREBASE_TOKEN

This deployed the stuffs to firebase.

Not sure why it wont find the public folder when we let it handle deployment on its own.

But the status of the build was still Errored. Wasnt sure how to make that successful while in debug mode

jenishngl avatar Oct 02 '20 09:10 jenishngl

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

stale[bot] avatar Jan 08 '22 23:01 stale[bot]