chore(docs.angularjs.org): install firebase dependencies before deploying

Firebase is trying to execute our functions code locally in order to
parse the triggers. Install npm dependencies to avoid errors like:

```
Error: Error parsing triggers: Cannot find module 'firebase-functions'
```

Closes #16453
This commit is contained in:
George Kalpakas
2018-02-13 01:25:34 +02:00
parent fb479188f5
commit ba140dbff9
2 changed files with 13 additions and 2 deletions
@@ -20,4 +20,4 @@ build steps.
Creates a server at localhost:5000 that serves from deploy/docs and uses the local function
See /scripts/code.angularjs.org-firebase/readme.firebase.code.md for the firebase deployment to
code.angularjs.org
code.angularjs.org
+12 -1
View File
@@ -2,6 +2,9 @@
set -e
readonly THIS_DIR=$(cd $(dirname $0); pwd)
readonly ROOT_DIR="$THIS_DIR/../.."
export BROWSER_STACK_ACCESS_KEY
export SAUCE_ACCESS_KEY
@@ -80,6 +83,14 @@ case "$JOB" in
if [[ "$DEPLOY_DOCS" == true || "$DEPLOY_CODE" == true ]]; then
grunt prepareDeploy
if [[ "$DEPLOY_DOCS" == true ]]; then
# Install npm dependencies for Firebase functions.
(
cd "$ROOT_DIR/scripts/docs.angularjs.org-firebase/functions"
npm install
)
fi
else
echo "Skipping deployment build because conditions have not been met."
fi
@@ -94,4 +105,4 @@ case "$JOB" in
or\
'deploy'."
;;
esac
esac