-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (42 loc) · 1.21 KB
/
main.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
name: "CI"
on:
push:
branches: [main]
paths-ignore:
- "**.md"
- ".github/dependabot.yml"
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
steps:
- name: "[SET UP] Checkout 🛎"
uses: actions/checkout@v4.1.1
- name: "[SET UP] Setup node env 🏗"
uses: actions/setup-node@v4.0.2
with:
node-version: ${{ matrix.node }}
- name: "[SET UP] Cache node_modules 📦"
uses: actions/cache@v4.0.1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: "[SET UP] Install dependencies 👨🏻💻"
run: npm ci
- name: "[QUALITY] Run linter 👀"
run: npm run lint
- name: "[QUALITY] Run unit tests 🧪"
run: npm run test
- name: "[DEPLOY] Build for production"
run: npm run generate
- name: "[DEPLOY] Deploy to Firebase"
uses: w9jds/firebase-action@v13.4.0
with:
args: deploy --only hosting
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}