Unable to find firebase hosting public directory

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",
    .....
    .....

I logged back into debug mode and ran the
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.

Can’t say anything without seeing the build.

What info would you need?

The build. I.e. the build link.

https://travis-ci.com/github/jenishngl/gold-price-tracker-ui/builds/187755678

Oh, it’s private. Then only Travis staff members will be able to see it :neutral_face:

Basically, I need to see your build config, build logic, full output and any build config validation messages – to see what exactly you are doing and getting.

Possible reasons that I currently see:

  • you change the current directory mid-build so public is no longer a valid path
  • you don’t specify some required parameters in the deployment clause, or they are changed by build config validation (then there should be a corresponding message on the bulid config tab)
  • there’s a typo somewhere in the directory name (e.g. a trailing space or a national or invisible character)

Hello @jenishngl,

This is Mustafa from Travis CI Support Team.

Since you have run debug build your log output is overwritten however, I think

deploy:
   skip_cleanup: true

will make your deployment green. Would you mind giving a try?

Thanks,

Imprint