Firebase and Github Hosting for Multiple Sites

In this blog, we will introduce:
1) the commands for hosting multiple websites under one firebase project,
2) the commands to login Git Bash, and
3) the commands for Github hosting via Git Bash.

For firebase reauthenticating:

  • $ firebase login --reauth

1. Hosting multiple websites in one Firebase project:

I) Commands for firebase installation:

  • $ node -v
  • $ npm install -g firebase-tools
  • $ firebase -V
  • $ firebase login

For node JS download, please visit: https://nodejs.org/en/

If you are using VScode to upload files for firebase and you have the error message:
" Firebase cannot be loading because running scripts is disabled on this system".

To solve this problem, please run the following commands in PowerShell as an Administrator:

  • $ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
  • $ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

For more information, please visit: https://bobbyhadz.com/


II) Commands for updating cotent to firebase:

  • $ firebase target:apply hosting amc21 amc-21
  • $ firebase deploy --only hosting:amc21

Hosting website name is "amc21", and the folder is named "amc-21" under "public" folder. For more information, please refer to deploy-multiple-sites-to-firebase.


firebase.png

github

2. Github hosting deployment via Git Bash

1) Commands to login Git Bash:

  • $ git config --global user.name "aviccomm"
  • $ git config --global user.email "aviccomm@aviccomm.net"
  • $ git config --global user.password "12345678"
  • $ git config --global credential.helper store
  • $ git config --list --show-origin

For git bash download, please visit: https://git-scm.com/downloads

2) Commands for Github hosting via Git Bash:

  • $ git clone https://github.com/aviccomm/aviccomm.github.io/
  • $ git add .
  • $ git commit -m "second commit"
  • $ git push -u origin main

For more information, please refer to https://lz284.org.


Leave a Reply

Your email address will not be published. Required fields are marked *

Your email address will not be published. Required fields are marked *

Submit