Files
Joey Perrott 07dd195c40 WIP
2024-02-14 17:20:18 +00:00

53 lines
2.0 KiB
YAML

name: CI
on:
push:
branches:
- jperrott-test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
defaults:
run:
shell: bash
jobs:
adev-deploy:
if: github.event_name == 'push' && github.ref_name == 'jperrott-test'
# needs: [adev]
# if: needs.adev.result == 'success' && github.event_name == 'push' && github.ref_name == 'jperrott-test'
env:
DEPLOY_PROJECT: angular-dev-site
DEPLOY_SITE: next-angular-dev
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@f89362d698858f9674463e48fde514b097a15838
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@f89362d698858f9674463e48fde514b097a15838
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@f89362d698858f9674463e48fde514b097a15838
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Build adev to ensure it continues to work
run: yarn bazel build --config=aio_local_deps //adev:build --fast_adev
- name: Move generated project files into location for deployment
run: cp -r dist/bin/adev/build adev/build
- name: Setup firebase context
run: |
npx -y firebase-tools@latest target:clear --config adev/firebase.json --project ${{ env.DEPLOY_PROJECT }} hosting angular-docs
npx -y firebase-tools@latest target:apply --config adev/firebase.json --project ${{ env.DEPLOY_PROJECT }} hosting angular-docs ${{ env.DEPLOY_SITE }}
- name: Deploy to firebase
uses: FirebaseExtended/action-hosting-deploy@120e124148ab7016bec2374e5050f15051255ba2 # v0.7.1
with:
# Note: No token used here as the action otherwise may attempt to post a comment.
repoToken: ''
entryPoint: './adev'
firebaseServiceAccount: ${{ secrets.ANGULAR_DEV_SITE_DEPLOY }}
projectId: ${{ env.DEPLOY_PROJECT }}
channelId: live