Deploying adev preview #80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow runs whenever the ADEV build workflow has completed. Deployment happens | |
# as part of a dedicated second workflow to avoid security issues where the building would | |
# otherwise occur in an authorized context where secrets could be leaked. | |
# | |
# More details can be found here: | |
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/. | |
name: Deploying adev preview | |
on: | |
workflow_run: | |
workflows: ['Build adev for preview deployment'] | |
types: [completed] | |
permissions: | |
# Needed in order to be able to comment on the pull request. | |
pull-requests: write | |
# Needed in order to checkout the repository | |
contents: read | |
# Needed in order to retrieve the artifacts from the previous job | |
actions: read | |
env: | |
PREVIEW_PROJECT: angular-ja | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@53fb7c37cf14343f14ed79e2fefbbb2489ead4ee | |
with: | |
github-token: '${{secrets.GITHUB_TOKEN}}' | |
workflow-artifact-name: 'adev-preview' | |
firebase-config-dir: './' | |
firebase-public-dir: './build/dist/bin/adev/build/browser' | |
firebase-project-id: '${{env.PREVIEW_PROJECT}}' | |
firebase-service-key: '${{secrets.FIREBASE_SERVICE_ACCOUNT}}' |