From 192df7194b3ace5e52dfb6bb6435503e4e22d9e9 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Sun, 4 Dec 2022 17:52:28 +0000 Subject: [PATCH] build: set target firebase project when setting deploy target (#48352) We now set the Firebase deploy target for AIO preview deployment via GitHub actions. It looks like configuring the deploy target also requires authentication / or a project. PR Close #48352 --- .github/workflows/aio-preview-deploy.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/aio-preview-deploy.yml b/.github/workflows/aio-preview-deploy.yml index 73541b73b60..5e51c5fca36 100644 --- a/.github/workflows/aio-preview-deploy.yml +++ b/.github/workflows/aio-preview-deploy.yml @@ -16,6 +16,10 @@ permissions: # Needed in order to be able to comment on the pull request. pull-requests: write +env: + # TODO(pgschwendtner): use a different project for framework previews here. + PREVIEW_PROJECT: ng-comp-dev + jobs: aio-deploy: runs-on: ubuntu-latest @@ -27,9 +31,9 @@ jobs: working-directory: aio/ run: | # We can use `npx` as the Firebase deploy actions uses it too. - npx -y firebase-tools@latest use ng-comp-dev - npx -y firebase-tools@latest target:clear hosting aio - npx -y firebase-tools@latest target:apply hosting aio ng-comp-dev + # The default site is used as we don't use multi-sites in the project. + npx -y firebase-tools@latest target:clear --project ${{env.PREVIEW_PROJECT}} hosting aio + npx -y firebase-tools@latest target:apply --project ${{env.PREVIEW_PROJECT}} hosting aio ${{env.PREVIEW_PROJECT}} - uses: angular/dev-infra/github-actions/deploy-previews/upload-artifacts-to-firebase@3bc93449e11b733260d0294305bf57240d7e0a81 with: @@ -37,6 +41,5 @@ jobs: workflow-artifact-name: 'aio' firebase-config-dir: './aio/' firebase-public-dir: './aio/dist' - # TODO(pgschwendtner): use a different project for framework previews here / or combine. - firebase-project-id: 'ng-comp-dev' + firebase-project-id: '${{env.PREVIEW_PROJECT}}' firebase-service-key: '${{secrets.FIREBASE_PREVIEW_SERVICE_TOKEN}}'