-
Notifications
You must be signed in to change notification settings - Fork 14
57 lines (46 loc) · 1.32 KB
/
ci.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
name: Lint and Build
on:
# Run on PR for CI purposes
pull_request:
# Run on push to our deployed branches for CD purposes
push:
branches:
- develop
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install Dependencies
run: npm install
- name: Lint Files
run: npm run lint
- name: Build
run: npm run build
# Uncomment when ready to run tests
# - name: Test
# run: npm test
# Used to test deployment integration
# - name: Upload Build artifacts for testing
# if: ${{ github.ref == 'refs/heads/test-github-actions' }}
# uses: actions/upload-artifact@v2
# with:
# name: build-test
# path: build
- name: Upload develop build artifacts for deployment
if: ${{ github.ref == 'refs/heads/develop' }}
uses: actions/upload-artifact@v4
with:
name: build-train
path: dist
- name: Upload master build artifacts for deployment
if: ${{ github.ref == 'refs/heads/master' }}
uses: actions/upload-artifact@v4
with:
name: build-prod
path: dist