question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deploying to Multiple Domains within the same project

See original GitHub issue

Action config

- uses: FirebaseExtended/action-hosting-deploy@v0
    with:
          repoToken: '${{ secrets.GITHUB_TOKEN }}'
          firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_xxxxxx }}'
          channelId: live
          projectId: xxxxx

Actual behavior

It works, but I would like to know how to change it to work for a specific project.

  1. In Firebase I have the main project start-bootstrap but I also have another 20 different, but they are in the same project but all have different subdomains. When I deploy all my projects, they deploy to start-bootstrap, but I want them to have different subdomains

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
JamesVanWazacommented, May 27, 2022

@killoblanco if you have any questions let me know, otherwise closing

1reaction
killoblancocommented, May 26, 2022

Hi, yesterday (05/24/2022) I did face this issue. Below is a code snippet letting you know how I did figure it out. I hope this helps to solve this issue 😃

secrets.FIREBASE_TOKEN was generated by running firebase login:cli

- run: npm i -g firebase-tools
- run: firebase use --add <project-id> --token ${{ secrets.FIREBASE_TOKEN }}
- run: firebase target:apply hosting <target-name> <target-id>
- uses: FirebaseExtended/action-hosting-deploy@v0
  with:
    repoToken: '${{ secrets.GITHUB_TOKEN }}'
    firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_KILLOBLANCO_119F3 }}'
    target: <target-name>
    projectId: <project-id>

My conclusion about this is that as far as the firebase CLI uses the file .firebaserc but this is usually not committed in the repository you must install and create the file on the remote process before running the action, so the action can perform successfully

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I serve multiple projects under a single domain?
Learn how to serve multiple Vercel projects from a single domain. ... Instead of deploying a project with source code, you can deploy...
Read more >
Adding multiple, custom domains - Surge
You can accomplish the same, desired result—making a project available at mutliple domain names—by redirecting your other domains, to the project's primary ...
Read more >
Sites with multiple domains - Netlify Docs
Manage multiple domains for your site using domain aliases and domain-level redirects. Set a primary domain, and consider using branch subdomains.
Read more >
Firebase hosting with multiple directories at multiple domains
You can associate multiple domains with a single site, but at present you cannot have multiple sites in the same project.
Read more >
Share project resources across multiple sites | Firebase Hosting
On this page · Step 1: Update your Firebase CLI version · Step 2: Add additional sites. Delete a secondary site · Step...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found