Adding Firebase Hosting deployment documentation (#378)

* Adding first version of Firebase Hosting documentation

* Renaming public to site for clarification
This commit is contained in:
ItsPugle 2018-02-04 21:06:04 +10:00 committed by cinwell.li
parent bedc262d83
commit 0ecdacc7dc

View File

@ -39,6 +39,28 @@ pages:
!> You can replace script with `- cp -r docs/. public`, if `./docs` is your Docsify subfolder.
## Firebase Hosting
!> You'll need to install the Firebase CLI using `npm i -g firebase-tools` after signing into the [Firebase Console](https://console.firebase.google.com) using a Google Account.
Using Terminal determine and navigate to the directory for your Firebase Project - this could be `~/Projects/Docs` etc. From there, run `firebase init`, choosing `Hosting` from the menu (use **space** to select, **arrow keys** to change options and **enter** to confirm). Follow the setup instructions.
You should have your `firebase.json` file looking similar to this (I changed the deployment directory from `public` to `site`):
```json
{
"hosting": {
"public": "site",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}
```
Once finished, build the starting template by running `docsify init ./site` (replacing site with the deployment directory you determined when running `firebase init` - public by default). Add/edit the documentation, then run `firebase deploy` from the base project directory.
## VPS
Try following nginx config.