Firebase

更新日:2022/10/04

FirebaseはGoogle社が運営するクラウドサービスで、ホスティング機能があります。

https://firebase.google.com/
Firebase

手順

プロジェクトを追加して「Hosting」を設定します。

Hostingの設定

画面に表示されたFirebaseのセットアップコマンドを実行します。

Firebaseのセットアップコマンド

手順にそってローカルのターミナルで firebase init します。

ローカルのコマンド実行

設問スタイルで設定内容を選択します。

? Which Firebase features do you want set up...
> Hosting: Configure files for Firebase Hosting

? Please select an option:
> Use an existing project

? Select a default Firebase project for this directory:
> {デプロイ先のGitリポジトリを選択}

? What do you want to use as your public directory?
> _book

? Configure as a single-page app(rewrite all urls to /index.html)?
> No

? File _book/index.html already exists. Overwrite?
> No

設問が完了すると認証画面が表示されるのでFirebaseからGitHubリポジトリの読み取りを許可します。

読み取りを許可

initコマンドが完了すると firebase.json などの設定ファイルが生成されます。

firebase deploy コマンドを実行してデプロイします。

firebase deploy

公開したサイト

このサイトはFirebaseにデプロイしたものです。

results matching ""

    No results matching ""