From 4267ad65a5725da567c63e26dc43c29f3efbbf8b Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Fri, 5 Feb 2021 21:19:02 +0200 Subject: [PATCH] chore(ci): use default project from config when deploying to Firebase Previously, when deploying `scripts/{code,docs}.angularjs.org-firebase/` to Firebase, we explicitly specified the target projects. Since the project IDs are also specified in the respective `.firebaserc` files, this was unnecessary (and meant we had multiple places to update if the IDs changed). This commit simplifies the process by automatically targeting the default projects (as configured in the `.firebaserc` files) when deploying to Firebase in CI. --- .circleci/config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 26d33402d..d3c52c41a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -383,7 +383,8 @@ jobs: # Do not use `yarn firebase` as that causes the Firebase CLI to look for `firebase.json` # in the root directory, even if run from inside `scripts/code.angularjs.org-firebase/`. firebase=$(yarn bin)/firebase - $firebase deploy --message "Commit:\ $CI_COMMIT" --non-interactive --project "code-angularjs-org-338b8" --token "$FIREBASE_TOKEN" + $firebase use + $firebase deploy --message "Commit:\ $CI_COMMIT" --non-interactive --token "$FIREBASE_TOKEN" # The `deploy-docs` job should only run when all of these conditions are true for the build: # - It is for the `angular/angular.js` repository (not a fork). @@ -412,7 +413,8 @@ jobs: # Do not use `yarn firebase` as that causes the Firebase CLI to look for `firebase.json` # in the root directory, even if run from inside `scripts/docs.angularjs.org-firebase/`. firebase=$(yarn bin)/firebase - $firebase deploy --message "Commit:\ $CI_COMMIT" --non-interactive --project "docs-angularjs-org-9p2" --token "$FIREBASE_TOKEN" + $firebase use + $firebase deploy --message "Commit:\ $CI_COMMIT" --non-interactive --token "$FIREBASE_TOKEN" workflows: version: 2