1- # Use the latest 2.1 version of CircleCI pipeline process engine.
2- # See: https://circleci.com/docs/configuration-reference
31version : 2.1
4-
5- # Settings common to each job
6- job_defaults : &job_defaults
7- working_directory : ~/angular-docs-es
8- docker :
9- - image : cimg/node:lts-browsers
10-
11- orbs :
12- node : circleci/node@5.2.0
13- build-tools : circleci/build-tools@3.0.0
14- browser-tools : circleci/browser-tools@1.4.8
15-
16- commands :
17- # Command for checking out the source code from GitHub. This also ensures that the source code
18- # can be merged to the main branch without conflicts.
19- checkout_and_rebase :
20- description : Checkout and verify clean merge with main
21- steps :
22- - checkout
23- - run :
24- name : Set git user.name and user.email for rebase.
25- # User is required for rebase.
26- command : |
27- git config user.name "Admin"
28- git config user.email "admin@angular.lat"
29- - build-tools/merge-with-parent :
30- parent : main
31- setup :
32- description : ' Set up executor'
33- steps :
34- - attach_workspace :
35- at : ~/
36- setup_firebase_auth :
37- description : ' Set up Firebase authentication'
38- steps :
39- - run :
40- name : Create a google_service_account.json
41- command : |
42- echo $GSA_KEY > $GOOGLE_APPLICATION_CREDENTIALS
43-
44- # ----------------------------------
45- # Job definitions.
46- # ----------------------------------
47-
482jobs :
49- # ----------------------------------
50- # initialize job
51- # ----------------------------------
52- initialize :
53- << : *job_defaults
54- steps :
55- - checkout_and_rebase
56- - node/install-packages
57- - persist_to_workspace :
58- root : ~/
59- paths :
60- - angular-docs-es
61- # -----------------------------------
62- # Build job.
63- # -----------------------------------
643 build :
65- << : *job_defaults
66- steps :
67- - setup
68- - checkout
69- - run :
70- name : Build project in CI mode (pre build)
71- command : npm run build:ci
72- - run :
73- name : Installing packages
74- working_directory : ./build
75- command : yarn install
76- - run :
77- name : Build adev-es docs
78- working_directory : ./build
79- command : yarn bazel build //adev:build --fast_adev --local_ram_resources="HOST_RAM*.90" --jobs=1
80- - persist_to_workspace :
81- root : ~/
82- paths :
83- - angular-docs-es/build/dist/bin/adev/build/browser
84-
85- # -----------------------------------
86- # Firebase deploy to staging job.
87- # -----------------------------------
88- firebase-deploy-staging :
89- << : *job_defaults
4+ docker :
5+ - image : circleci/node:12-browsers
906 steps :
91- - setup
92- - setup_firebase_auth
93- - run :
94- name : ' Deploy Main Branch to Firebase Hosting'
95- command : |
96- npm run deploy:staging
97-
98- workflows :
99- build-workflow :
100- jobs :
101- - initialize
102- - build :
103- requires :
104- - initialize
105- - firebase-deploy-staging :
106- filters :
107- branches :
108- only :
109- - main
110- requires :
111- - build
7+ - run : echo 'No checks.'
0 commit comments