Skip to content

Commit

Permalink
build: set target firebase project when setting deploy target (#48352)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
devversion committed Dec 4, 2022
1 parent 0d6b33c commit 192df71
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/aio-preview-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,16 +31,15 @@ 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:
github-token: '${{secrets.GITHUB_TOKEN}}'
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}}'

0 comments on commit 192df71

Please sign in to comment.