Previously, in order to deploy to Firebase from `scripts/docs.angularjs.org-firebase/`, we had to copy the `firebase.json` file to the repository root and adjust the contained paths accordingly. By running the `firebase` CLI directly (instead of via `yarn`), we are able to deploy from `docs.angularjs.org-firebase/` directly. This simplifies the deployment (and local testing) process and paves the way for also deploying from `code.angularjs.org-firebase/` in a subsequent commit.
1.0 KiB
Firebase for docs.angularjs.org
This folder contains the Google Firebase scripts for the docs.angularjs.org setup.
See /scripts/code.angularjs.org-firebase/readme.firebase.code.md for the Firebase deployment to code.angularjs.org.
Continuous integration
The docs are deployed to Google Firebase hosting and functions automatically via CI.
See .circleci/config.yml for the complete deployment config and build steps.
Serving locally:
-
Run
cd scripts/docs.angularjs.org-firebase. This changes the current working directory. -
Run
yarn grunt package. This builds the files that will be deployed. -
Run
yarn grunt prepareDeploy. This copies docs content files into./deployand the partials for Search Engine AJAX Crawling into./functions/content. -
Run
$(yarn bin)/firebase emulators:start(or..\..\node_modules\.bin\firebase emulators:starton Windows). Creates a server at http://localhost:5000 that serves from./deployand uses the local function.