-
-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (51 loc) · 1.45 KB
/
cms.workflow.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
name: Deploy CMS
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'definitions/**/*'
- 'client/projects/cms/**/*'
- '.github/workflows/cms.workflow.yml'
jobs:
deploy:
timeout-minutes: 15
name: Deploy
runs-on: ubuntu-latest
env:
project: 'jaspero-jms'
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Use Node.js 18.16.0
uses: actions/setup-node@v2
with:
node-version: 18.16.0
- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: |
client/node_modules
definitions/node_modules
key: npm-${{ hashFiles('client/package-lock.json') }}-${{ hashFiles('definitions/package-lock.json') }}
- name: Install Definitions
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm --prefix definitions ci --ignore-scripts
- name: Build Definitions
run: npm --prefix definitions run build
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm --prefix client ci --ignore-scripts
- name: Build
run: npm run build:cms
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting:cms
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
PROJECT_ID: ${{ env.project }}