🛠️

Firebase hostingでターゲットを変える

2022/07/04に公開

dev用サイトを追加

プロジェクトのエイリアスを作成

supermekabu@pop-os ~/hogehoge (master +%=) $ firebase use --add
? Which project do you want to add? hogehoge
? What alias do you want to use for this project? (e.g. staging) hoge

Created alias hoge for hogehoge.
Now using alias hoge (hogehoge)

hostingターゲットを追加

supermekabu@pop-os ~/hogehoge (master *=) $ firebase target:apply hosting production hoge
✔  Applied hosting target production to hoge

Updated: production (hoge)


supermekabu@pop-os ~/hogehoge (master *=) $ firebase target:apply hosting develop dev-hoge
✔  Applied hosting target develop to dev-hoge

Updated: develop (dev-hoge)

デプロイコマンド

firebase deploy --only hosting:develop

or

firebase deploy --only hosting:production

Discussion