-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (45 loc) · 1.2 KB
/
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
51
52
53
name: Deploy to Firebase Hosting
on:
push:
branches:
- master
- vite_ver
- nodejs-backend-test
pull_request:
types: [closed]
branches:
- master
- vite_ver
- nodejs-backend-test
jobs:
build:
if: github.event.pull_request.merged == true || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/vite_ver'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies for frontend
run: |
cd frontend
pnpm install --no-frozen-lockfile
- name: Build frontend
run: |
cd frontend
pnpm run build
- name: Install dependencies for backend
run: |
cd backend
pnpm install --no-frozen-lockfile
- name: Deploy to Firebase Hosting
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
run: |
npm install -g firebase-tools
cd backend
firebase deploy --only hosting,functions