-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.27 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
name: React CI
on: [push]
jobs:
build:
name: Build and unit test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm install
- run: npm run build --if-present
- run: npm test
# cypress:
# name: Cypress test
# needs: [build]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Cache firebase emulators
# uses: actions/cache@v2
# with:
# path: ~/.cache/firebase/emulators
# key: ${{ runner.os }}-firebase-emulators-${{ hashFiles('~/.cache/firebase/emulators/**') }}
# - run: npm install -g firebase-tools
# - uses: cypress-io/github-action@v4
# with:
# build: npm run build
# start: npm run em:run
# wait-on: http://localhost:3000
deploy:
name: Firebase deploy
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '22'
- run: npm install
- run: npm run build
- run: npm install -g firebase-tools
- run: firebase deploy --token "${{ secrets.FIREBASE_DEPLOY_TOKEN }}" --non-interactive