Skip to content

Commit 6efc8a1

Browse files
committed
FIX: firebase-deploy
1 parent f32d446 commit 6efc8a1

File tree

2 files changed

+66
-4
lines changed

2 files changed

+66
-4
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Deploy To Firebase
5+
6+
on:
7+
push:
8+
branches: [ development ]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [10.x]
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
- name: install Yarn and FIrebase
26+
run: |
27+
npm install -g yarn
28+
- name: Lint
29+
run: |
30+
yarn install
31+
yarn lint
32+
- name: Build
33+
run: |
34+
yarn install
35+
yarn build
36+
env:
37+
APIKEY: ${{ secrets.APIKEY_DEV }}
38+
AUTHDOMAIN: ${{ secrets.AUTHDOMAIN_DEV }}
39+
DATABASEURL: ${{ secrets.DATABASEURL_DEV }}
40+
PROJECTID: ${{ secrets.PROJECTID_DEV }}
41+
STORAGEBUCKET: ${{ secrets.STORAGEBUCKET_DEV }}
42+
MESSAGINGSENDERID: ${{ secrets.MESSAGINGSENDERID_DEV }}
43+
APPID: ${{ secrets.APPID_DEV }}
44+
MEASUREMENTID: ${{ secrets.MEASUREMENTID_DEV }}
45+
- name: Copy
46+
run: |
47+
mkdir -p dist/server
48+
mkdir -p dist/client
49+
cp -R functions/* dist/server
50+
cp -R src/static/* dist/client
51+
mkdir -p dist/server/.nuxt
52+
cp -R .nuxt/* dist/server/.nuxt/
53+
mkdir -p dist/client/assets
54+
cp -R dist/server/.nuxt/dist dist/client/assets
55+
- name: install
56+
run: yarn install --cwd dist/server
57+
- name: Deploy
58+
run: |
59+
npm install -g firebase-tools
60+
firebase use development
61+
firebase deploy --token $FIREBASE_TOKEN
62+
env:
63+
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
64+

.github/workflows/firebase-deploy.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,11 @@ jobs:
5353
mkdir -p dist/client/assets
5454
cp -R dist/server/.nuxt/dist dist/client/assets
5555
- name: install
56-
run: |
57-
cd dist/server
58-
npm install
59-
cd ../../
56+
run: yarn install --cwd dist/server
6057
- name: Deploy
6158
run: |
6259
npm install -g firebase-tools
60+
firebase use default
6361
firebase deploy --token $FIREBASE_TOKEN
6462
env:
6563
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

0 commit comments

Comments
 (0)