-
Notifications
You must be signed in to change notification settings - Fork 33
96 lines (80 loc) · 2.67 KB
/
deploy-cms.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CMS
on:
workflow_call:
inputs:
environment:
required: true
type: string
jobs:
deploy:
name: Deploy
runs-on: ubuntu-20.04
environment: cms-${{ inputs.environment }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js v18.18
uses: actions/setup-node@v3
with:
node-version: 18.18
- name: Cache Root Dependencies
id: cache-root-node-modules
uses: actions/cache@v2
with:
path: ./node_modules
key: node-modules-${{ hashFiles('./yarn.lock') }}
- name: Install Root Dependencies
if: steps.cache-root-node-modules.outputs.cache-hit != 'true'
run: yarn
- name: Cache Shared Dependencies
id: cache-shared-node-modules
uses: actions/cache@v2
with:
path: ./shared/node_modules
key: shared-node-modules-${{ hashFiles('./shared/yarn.lock') }}
- name: Install Shared Dependencies
if: steps.cache-shared-node-modules.outputs.cache-hit != 'true'
working-directory: ./shared
run: yarn
- name: Cache Content Dependencies
id: cache-content-node-modules
uses: actions/cache@v2
with:
path: ./content/node_modules
key: content-node-modules-${{ hashFiles('./content/yarn.lock') }}
- name: Install Content Dependencies
if: steps.cache-content-node-modules.outputs.cache-hit != 'true'
working-directory: ./content
run: yarn
- name: Cache Client Dependencies
id: cache-client-node-modules
uses: actions/cache@v2
with:
path: ./client/node_modules
key: client-node-modules-${{ hashFiles('./client/yarn.lock') }}
- name: Install Client Dependencies
if: steps.cache-client-node-modules.outputs.cache-hit != 'true'
working-directory: ./client
run: yarn
- name: Cache CMS Dependencies
id: cache-cms-node-modules
uses: actions/cache@v2
with:
path: ./cms/node_modules
key: cms-node-modules-${{ hashFiles('./cms/yarn.lock') }}
- name: Install CMS Dependencies
if: steps.cache-cms-node-modules.outputs.cache-hit != 'true'
working-directory: ./cms
run: yarn
- name: Build Content
working-directory: ./content
run: yarn build
- name: Build CMS
working-directory: ./cms
run: yarn build
- name: Deploy CMS
run: >
yarn firebase deploy
--project ${{ secrets.FIREBASE_PROJECT }}
--token ${{ secrets.FIREBASE_TOKEN }}
--only hosting:cupcake-29k-cms
--non-interactive