From 0ecdacc7dcb99312109e6f65ff608798d4acffd0 Mon Sep 17 00:00:00 2001 From: ItsPugle <22669894+ItsPugle@users.noreply.github.com> Date: Sun, 4 Feb 2018 21:06:04 +1000 Subject: [PATCH] Adding Firebase Hosting deployment documentation (#378) * Adding first version of Firebase Hosting documentation * Renaming public to site for clarification --- docs/deploy.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/deploy.md b/docs/deploy.md index 4db657a39..7a4e03e0f 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -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.