Firebase and Github Hosting for Multiple Sites
In this blog, we will present:
- The commands for hosting multiple websites under one firebase project
- The commands to login Git Bash
- The commands for Github hosting via Git Bash
Here is the demo: https://app.amc0.com and https://cafe.amc0.com/.
For firebase reauthenticating:
- $ firebase login --reauth
1. Hosting multiple websites in one Firebase project:
(1) Commands for firebase installation:
- $ node -v
- $ npm install -g firebase-tools
- $ firebase -V
- $ firebase login
- $ firebase init
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/
(2) Commands for updating cotent to firebase:
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 target:apply hosting amc21 amc-21
- $ firebase deploy --only hosting:amc21
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 status
- $ git commit -m "second commit"
- $ git push -u origin main
For more information, please refer to https://eulz.net.
Leave a Comments
Send us your valuable feedback about our services