Reputation: 2358
I have configured a project that currently is possible to deploy to Firebase Hosting multi sites by using the Firebase CLI.
The problem is that currently I am doing this manually. And I want to programatically do this, and if possible, using NodeJS.
firebase hosting:sites:create game-project-id-unique
firebase target:apply hosting game-id game-project-id-unique
{
"target": "game-id",
"public": "games/game-id",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
}
firebase deploy --only hosting
I have researched here, I have found out that is possible to use the API-DEPLOY or the CLOUD BUILD, but this is not enough to guide me into the programatically approach, without the need of a human in-between.
Is there a way of doing this? Is it even possible?
Upvotes: 0
Views: 296
Reputation: 317342
You can certainly just write a script that invokes the CLI. This is very common.
You can also use the Firebase Hosting REST API, but in my opinion that is going to be a lot more work.
Upvotes: 1