I've followed the instructions yet my travis build is failing because of:
Specified public directory does not exist, can't deploy hosting
The yarn build succeeds but deployment fails. Could it be that the firebase gem of Travis is ignoring the hosting/public key in the firebase.json?
My .travis.yml
language: node_js
warnings_are_errors: false
node_js:
- '9'
before_script:
- export CI=false
cache:
yarn: true
directories:
- node_modules
before_deploy:
- yarn build
deploy:
provider: firebase
token:
secure: xxx
env:
global:
- secure: xxx
My firebase.json
{
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
add
deploy:
skip_cleanup: true
to your .travis.yml . The git stash --all step will remove your local build directory before the deploy phase. Hence it can't find your build dir.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With