Skip to content

Conversation

@aalej
Copy link
Contributor

@aalej aalej commented May 12, 2025

Description

Fixes #8536. It looks like the new inquirer behavior does not need to deconstruct the JS object to get the value

Scenarios Tested

$ firebase init hosting:github --project PROJECT_ID

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

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

  /Users/PATH/8536

Before we get started, keep in mind:

  * You are initializing within an existing Firebase project directory


=== 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  Using project PROJECT_ID (PROJECT_NAME)

=== Hosting:github Setup

i  Didn't detect a .git folder. Assuming /Users/PATH/8536 is the project root.
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=REDACT&state=861673146&redirect_uri=http%3A%2F%2Flocalhost%3A9005&scope=read%3Auser%20repo%20public_repo

Waiting for authentication...

✔  Success! Logged into GitHub as GH_USERNAME

✔ For which GitHub repository would you like to set up a GitHub workflow? (format: user/repository) GH_USERNAME/issues-8519

✔  Created service account github-action-980159727 with Firebase Hosting admin permissions.
✔  Uploaded service account JSON to GitHub as secret FIREBASE_SERVICE_ACCOUNT_SOME_TEST_PROJECT_E771B.
i  You can manage your secrets at https://github.com/GH_USERNAME/issues-8519/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/PATH/8536/.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/PATH/8536/.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/REDACT
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!

Sample Commands

firebase init hosting:github --project PROJECT_ID

@aalej aalej merged commit 3e24730 into master May 12, 2025
48 of 50 checks passed
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions May 12, 2025
@aalej aalej deleted the aalej-init-hosting-github branch June 6, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

404 when firebase init and setup github workflow

2 participants