Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit f93c770

Browse files
committed
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
1 parent 06f5069 commit f93c770

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Diff for: scripts/docs.angularjs.org-firebase/readme.firebase.docs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ build steps.
2020
Creates a server at localhost:5000 that serves from deploy/docs and uses the local function
2121

2222
See /scripts/code.angularjs.org-firebase/readme.firebase.code.md for the firebase deployment to
23-
code.angularjs.org
23+
code.angularjs.org

Diff for: scripts/travis/build.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
set -e
44

5+
readonly THIS_DIR=$(cd $(dirname $0); pwd)
6+
readonly ROOT_DIR="$THIS_DIR/../.."
7+
58
export BROWSER_STACK_ACCESS_KEY
69
export SAUCE_ACCESS_KEY
710

@@ -80,6 +83,14 @@ case "$JOB" in
8083

8184
if [[ "$DEPLOY_DOCS" == true || "$DEPLOY_CODE" == true ]]; then
8285
grunt prepareDeploy
86+
87+
if [[ "$DEPLOY_DOCS" == true ]]; then
88+
# Install npm dependencies for Firebase functions.
89+
(
90+
cd "$ROOT_DIR/scripts/docs.angularjs.org-firebase/functions"
91+
npm install
92+
)
93+
fi
8394
else
8495
echo "Skipping deployment build because conditions have not been met."
8596
fi
@@ -94,4 +105,4 @@ case "$JOB" in
94105
or\
95106
'deploy'."
96107
;;
97-
esac
108+
esac

0 commit comments

Comments
 (0)