Bowis
Bowis

Reputation: 632

Run Firebase deploy --only functions from firebase.json

I have my firebase.json set up like this:

{
      "functions": {
        "source": "functions",
        "predeploy": [
          "yarn build && rm -rf functions/nuxt && cp -r src/.nuxt/ functions/nuxt/ && cp src/nuxt.config.js functions/"
        ]
      },
      "hosting": {
          "predeploy": [
            "rm -rf public/* && mkdir -p public/_nuxt && cp -r src/.nuxt/dist/client/ public/_nuxt && cp -a src/static/. public/"
          ],
          "site": "",
          "public": "public",
          "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
          "rewrites": [
          {
            "source": "**",
            "function": "ssrapp"
          }
        ]
      }
    }

But since my firebase has multiple functions (in different apps), the CLI keeps asking me to specify a function, how can I do this in the firebase.json file?

Upvotes: 1

Views: 1163

Answers (1)

Martin Zeitler
Martin Zeitler

Reputation: 76849

Just tell it which functions to deploy:

firebase deploy --only functions:addMessage,functions:makeUppercase

But this may only take up to 10 functions per call:

To solve this, deploy functions in groups of 10 or fewer.

Upvotes: 4

Related Questions