Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebaseのセッティングの把握 #12

Open
MaximizedOwl opened this issue Apr 14, 2021 · 4 comments
Open

Firebaseのセッティングの把握 #12

MaximizedOwl opened this issue Apr 14, 2021 · 4 comments
Assignees
Labels

Comments

@MaximizedOwl
Copy link
Owner

MaximizedOwl commented Apr 14, 2021

以下、セッティング時のメモ

     ######## #### ########  ######## ########     ###     ######  ########
     ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
     ######    ##  ########  ######   ########  #########  ######  ######
     ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
     ##       #### ##     ## ######## ########  ##     ##  ######  ########

You're about to initialize a Firebase project in this directory:

  /Users/makiokarasawa/Documents/Sandbox/material-ui-paperbase-demo

? Which Firebase CLI features do you want to set up for this folder? Press Space to select featur
es, then Enter to confirm your choices. Hosting: Configure and deploy Firebase Hosting sites

=== Project Setup

First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add, 
but for now we'll just set up a default project.

? Please select an option: Use an existing project
? Select a default Firebase project for this directory: material-ui-paperbase-demo (material-ui-p
aperbase-demo)
i  Using project material-ui-paperbase-demo (material-ui-paperbase-demo)

=== Hosting Setup

Your public directory is the folder (relative to your project directory) that
will contain Hosting assets to be uploaded with firebase deploy. If you
have a build process for your assets, use your build's output directory.

? What do you want to use as your public directory? public
? Configure as a single-page app (rewrite all urls to /index.html)? No
? Set up automatic builds and deploys with GitHub? Yes
✔  Wrote public/404.html
? File public/index.html already exists. Overwrite? No
i  Skipping write of public/index.html

i  Detected a .git folder at /Users/makiokarasawa/Documents/Sandbox/material-ui-paperbase-demo
i  Authorizing with GitHub to upload your service account to a GitHub repository's secrets store.

Visit this URL on this device to log in:
https://github.com/login/oauth/authorize?client_id=89cf50f02ac6aaed3484&state=343815741&redirect_uri=http%3A%2F%2Flocalhost%3A9005&scope=read%3Auser%20repo%20public_repo

Waiting for authentication...

✔  Success! Logged into GitHub as MaximizedOwl

? For which GitHub repository would you like to set up a GitHub workflow? (format: user/repositor
y) MaximizedOwl/material-ui-paperbase-demo

✔  Created service account github-action-348967625 with Firebase Hosting admin permissions.
✔  Uploaded service account JSON to GitHub as secret FIREBASE_SERVICE_ACCOUNT_MATERIAL_UI_PAPERBASE_DEMO.
i  You can manage your secrets at https://github.com/MaximizedOwl/material-ui-paperbase-demo/settings/secrets.

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

✔  Created workflow file /Users/makiokarasawa/Documents/Sandbox/material-ui-paperbase-demo/.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? main

✔  Created workflow file /Users/makiokarasawa/Documents/Sandbox/material-ui-paperbase-demo/.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!
@MaximizedOwl MaximizedOwl added the documentation Improvements or additions to documentation label Apr 14, 2021
@MaximizedOwl MaximizedOwl self-assigned this Apr 14, 2021
@MaximizedOwl
Copy link
Owner Author

ディレクトリをpublicからbuildに変更

MyMacBookAir:material-ui-paperbase-demo makiokarasawa$ firebase init

     ######## #### ########  ######## ########     ###     ######  ########
     ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
     ######    ##  ########  ######   ########  #########  ######  ######
     ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
     ##       #### ##     ## ######## ########  ##     ##  ######  ########

You're about to initialize a Firebase project in this directory:

  /Users/makiokarasawa/Documents/Sandbox/material-ui-paperbase-demo

Before we get started, keep in mind:

  * You are initializing in an existing Firebase project directory

? Which Firebase CLI features do you want to set up for this folder? Press Space to select featur
es, then Enter to confirm your choices. Hosting: Configure and deploy Firebase Hosting sites

=== Project Setup

First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add, 
but for now we'll just set up a default project.

i  .firebaserc already has a default project, using material-ui-paperbase-demo.

=== Hosting Setup

Your public directory is the folder (relative to your project directory) that
will contain Hosting assets to be uploaded with firebase deploy. If you
have a build process for your assets, use your build's output directory.

? What do you want to use as your public directory? build
? Configure as a single-page app (rewrite all urls to /index.html)? No
? Set up automatic builds and deploys with GitHub? Yes
✔  Wrote build/404.html
? File build/index.html already exists. Overwrite? No
i  Skipping write of build/index.html

i  Detected a .git folder at /Users/makiokarasawa/Documents/Sandbox/material-ui-paperbase-demo
i  Authorizing with GitHub to upload your service account to a GitHub repository's secrets store.

Visit this URL on this device to log in:
https://github.com/login/oauth/authorize?client_id=89cf50f02ac6aaed3484&state=263612150&redirect_uri=http%3A%2F%2Flocalhost%3A9005&scope=read%3Auser%20repo%20public_repo

Waiting for authentication...

✔  Success! Logged into GitHub as MaximizedOwl

? For which GitHub repository would you like to set up a GitHub workflow? (format: user/repositor
y) MaximizedOwl/material-ui-paperbase-demo

✔  Created service account github-action-348967625 with Firebase Hosting admin permissions.
✔  Uploaded service account JSON to GitHub as secret FIREBASE_SERVICE_ACCOUNT_MATERIAL_UI_PAPERBASE_DEMO.
i  You can manage your secrets at https://github.com/MaximizedOwl/material-ui-paperbase-demo/settings/secrets.

? Set up the workflow to run a build script before every deploy? Yes
? What script should be run before every deploy? npm ci && npm run build
? GitHub workflow file for PR previews exists. Overwrite? firebase-hosting-pull-request.yml No
? 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? main
? The GitHub workflow file for deploying to the live channel already exists. Overwrite? firebase-
hosting-merge.yml Yes

✔  Created workflow file /Users/makiokarasawa/Documents/Sandbox/material-ui-paperbase-demo/.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!

参考文献

@MaximizedOwl
Copy link
Owner Author

GET https://material-ui-paperbase-demo.web.app/material-ui-paperbase-demo/static/js/2.ab8b2072.chunk.js net::ERR_ABORTED 404

がでる。

SPAのところをNoにしていたのでもう一度Initを試してみる。

@MaximizedOwl
Copy link
Owner Author

下記で初期化し直した。

MyMacBookAir:material-ui-paperbase-demo makiokarasawa$ firebase init

     ######## #### ########  ######## ########     ###     ######  ########
     ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
     ######    ##  ########  ######   ########  #########  ######  ######
     ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
     ##       #### ##     ## ######## ########  ##     ##  ######  ########

You're about to initialize a Firebase project in this directory:

  /Users/makiokarasawa/Documents/Sandbox/material-ui-paperbase-demo

Before we get started, keep in mind:

  * You are initializing in an existing Firebase project directory

? Which Firebase CLI features do you want to set up for this folder? Press Space to select featur
es, then Enter to confirm your choices. Hosting: Configure and deploy Firebase Hosting sites

=== Project Setup

First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add, 
but for now we'll just set up a default project.

i  .firebaserc already has a default project, using material-ui-paperbase-demo.

=== Hosting Setup

Your public directory is the folder (relative to your project directory) that
will contain Hosting assets to be uploaded with firebase deploy. If you
have a build process for your assets, use your build's output directory.

? What do you want to use as your public directory? build
? Configure as a single-page app (rewrite all urls to /index.html)? Yes
? Set up automatic builds and deploys with GitHub? Yes
? File build/index.html already exists. Overwrite? No
i  Skipping write of build/index.html

i  Detected a .git folder at /Users/makiokarasawa/Documents/Sandbox/material-ui-paperbase-demo
i  Authorizing with GitHub to upload your service account to a GitHub repository's secrets store.

Visit this URL on this device to log in:
https://github.com/login/oauth/authorize?client_id=89cf50f02ac6aaed3484&state=239778795&redirect_uri=http%3A%2F%2Flocalhost%3A9005&scope=read%3Auser%20repo%20public_repo

Waiting for authentication...

✔  Success! Logged into GitHub as MaximizedOwl

? For which GitHub repository would you like to set up a GitHub workflow? (format: user/repositor
y) MaximizedOwl/material-ui-paperbase-demo

✔  Created service account github-action-348967625 with Firebase Hosting admin permissions.
✔  Uploaded service account JSON to GitHub as secret FIREBASE_SERVICE_ACCOUNT_MATERIAL_UI_PAPERBASE_DEMO.
i  You can manage your secrets at https://github.com/MaximizedOwl/material-ui-paperbase-demo/settings/secrets.

? Set up the workflow to run a build script before every deploy? Yes
? What script should be run before every deploy? npm ci && npm run build
? GitHub workflow file for PR previews exists. Overwrite? firebase-hosting-pull-request.yml Yes

✔  Created workflow file /Users/makiokarasawa/Documents/Sandbox/material-ui-paperbase-demo/.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? main
? The GitHub workflow file for deploying to the live channel already exists. Overwrite? firebase-
hosting-merge.yml Yes

✔  Created workflow file /Users/makiokarasawa/Documents/Sandbox/material-ui-paperbase-demo/.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!

@MaximizedOwl
Copy link
Owner Author

エラーが出ている。

解決策の候補。

@MaximizedOwl MaximizedOwl added Research 技術調査等 and removed documentation Improvements or additions to documentation labels Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant