-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (40 loc) · 1.22 KB
/
build-deploy.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
## Continuous Integration Workflow
name: Build and Deploy
on: [push, pull_request]
# Target Branch Job
jobs:
Lint-Build-Test:
runs-on: ubuntu-latest
steps:
# Check Out Repository
- uses: actions/checkout@v1
# Install Node.js
- uses: actions/[email protected]
with:
node-version: 16.13.2
- name: Clear npm cache
run: npm cache clean --force
# Install Node Dependencies
- name: Installing NodeJS Dependencies
run: npm install
# Run Build
- name: Build
run: npm run build
# Run ESLint
- name: ESLint Check
run: npx eslint . --config .eslintrc.json --ext .js,.jsx,.ts,.tsx
# Run Prettier
- name: Prettier Check
run: npx prettier --check . --config .prettierrc.json
# # Run Jest Unit Tests
# - name: Unit Tests
# run: npx jest
# Deploy:
# needs: [Lint-Build-Test]
# runs-on: ubuntu-latest
# steps:
# # Re-Initialize Staging Server
# - if: github.ref == 'refs/heads/staging'
# name: Push Changes to Staging Server [LIVE]
# - if: github.ref == 'refs/heads/master'
# name: Push Changes to Production Server [LIVE]