firebase hosting を使用する

2021/05/21

Firebase

npm install firebase-tools
npx firebase login
npx firebase init

...

? What do you want to use as your public directory? docs-static #アップロードするフォルダ
? Configure as a single-page app (rewrite all urls to /index.html)? Yes #SPAの場合のリダイレクトするか
? Set up automatic builds and deploys with GitHub? Yes #githubでデプロイ
? File docs-static/index.html already exists. Overwrite? No # 上書き
✔  Wrote docs-static/index.html

# ブラウザ上でログイン

? For which GitHub repository would you like to set up a GitHub workflow? (format: user/repository) eeenb
nb/karaage-ng-site

✔  Created service account github-action-357494086 with Firebase Hosting admin permissions.
✔  Uploaded service account JSON to GitHub as secret FIREBASE_SERVICE_ACCOUNT_KARAAGE_NG.
i  You can manage your secrets at https://github.com/eeenbnb/karaage-ng-site/settings/secrets.

# その他 設定

? Set up the workflow to run a build script before every deploy? No

✔  Created workflow file /Users/eeenbnb/Desktop/work/karaage-ng-site/.github/workflows/firebase-hosting-pull-request.yml
? Set up automatic deployment to your site's live channel when a PR is merged? Yes
? What is the name of the GitHub branch associated with your site's live channel? master

✔  Created workflow file /Users/eeenbnb/Desktop/work/karaage-ng-site/.github/workflows/firebase-hosting-merge.yml

i  Action required: Visit this URL to revoke authorization for the Firebase CLI GitHub OAuth App:
https://github.com/settings/connections/applications/89cf50f02ac6aaed3484
i  Action required: Push any new workflow file(s) to your repo

i  Writing configuration info to firebase.json...
i  Writing project information to .firebaserc...

✔  Firebase initialization complete!
npx firebase deploy