-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.29 KB
/
deploy-tool-image-comparer.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
# Deploy on push to master
# This workflow affects all our Vue apps, so `website` and all tools. The logic for this automation is:
#
# 1. increment the version in package.json
# 2. push the new version to the master branch
# 3. build the project
# 4. deploy the project
# It relies on the `FIREBASE_TOKEN` secret being available in this repo.
name: deploy-tool-image-comparer
on:
push:
branches:
- master
paths:
- 'tools/image-comparer/assets/**'
- 'tools/image-comparer/public/**'
- 'tools/image-comparer/src/**'
- 'tools/image-comparer/.browserslistrc'
- 'tools/image-comparer/package.json'
- 'tools/image-comparer/package-lock.json'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build project
run: |
cd tools/image-comparer
npm ci
npm run build
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
PROJECT_PATH: 'tools/image-comparer'