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

Commit 66ada20

Browse files
committed
chore(ci): also deploy code-angularjs-org to Firebase
Previously, we only deployed the built files to Google Cloud Storage for the `code-angularjs-org` Firebase project. This meant that the other Firebase services (such as functions, hosting, storage) were not updated when we made changes to their source code or configuration. (This isn't a problem at the moment, since the code/configuration for these service changes infrequently, but could bite us in the future.) This commit fixes this by ensuring that we deploy to all enabled Firebase services (currently functions, hosting and storage).
1 parent c7d68fa commit 66ada20

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.circleci/config.yml

+14
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,20 @@ jobs:
370370
name: Sync files to code.angularjs.org
371371
command: |
372372
gsutil -m rsync -r scripts/code.angularjs.org-firebase/deploy gs://code-angularjs-org-338b8.appspot.com
373+
# Install dependencies for Firebase functions to prevent parsing errors during deployment.
374+
# See https://github.com/angular/angular.js/pull/16453.
375+
- run:
376+
name: Install dependencies in `scripts/code.angularjs.org-firebase/functions/`.
377+
working_directory: scripts/code.angularjs.org-firebase/functions
378+
command: yarn install --frozen-lockfile --ignore-engines --non-interactive
379+
- run:
380+
name: Deploy to Firebase from `scripts/code.angularjs.org-firebase/`.
381+
working_directory: scripts/code.angularjs.org-firebase
382+
command: |
383+
# Do not use `yarn firebase` as that causes the Firebase CLI to look for `firebase.json`
384+
# in the root directory, even if run from inside `scripts/code.angularjs.org-firebase/`.
385+
firebase=$(yarn bin)/firebase
386+
$firebase deploy --message "Commit:\ $CI_COMMIT" --non-interactive --project "code-angularjs-org-338b8" --token "$FIREBASE_TOKEN"
373387
374388
# The `deploy-docs` job should only run when all of these conditions are true for the build:
375389
# - It is for the `angular/angular.js` repository (not a fork).

0 commit comments

Comments
 (0)