Question
How can I deploy my Firebase site without erasing Cloud Functions.
- Maybe, include both site and cloud-functions in one deploy? What does that look like?
- Maybe, deploy the site without erasing cloud-functions? I don't find a
firebase deploy --only site
or similar
Context
I have a Firebase project that uses Cloud Functions. The code is in two folders:
-site-code
-cloud_function-code
When I want to deploy the project, I use firebase CLI tools, in two steps:
Step 1
from -site-code
I run:
firebase deploy
Step 2
then from cloud_functions-code
I run:
firebase deploy --only functions
Issue
When I run firebase deploy
from -site-code
, my Firebase Cloud Functions are deleted, so I must follow up with firebase deploy --only functions
from -cloud_functions-code
.
I did not find an --only
directive for deploying just the site code from -site-code
firebase deploy --except functions
will deploy just the site. As willfirebase deploy --only hosting
- Dan Getzfirebase deploy --only hosting
, which would only deploy hosting. - Frank van Puffelen