forked from oslokommune/okr-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.18 KB
/
deploy-dev.yml
File metadata and controls
46 lines (39 loc) · 1.18 KB
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
name: Deploy to DEV
on:
workflow_dispatch:
secrets:
ENV_FILE_DEV:
required: true
FIREBASE_PROJECT_ID_DEV:
required: true
FIREBASE_SERVICE_ACCOUNT_OKR_TRACKER_TEST:
required: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 16
- name: Populate env file
run: |
echo "${{ secrets.ENV_FILE_DEV }}" > .env
if ! grep -q VITE_PROJECT_ID .env; then
echo "::error:: The .env file is likely not populated correctly"
exit 1
fi
- name: Build
run: |
npm ci
npm --prefix functions ci functions
npm run build
- name: Deploy DEV
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_OKR_TRACKER_TEST }}"
projectId: "${{ secrets.FIREBASE_PROJECT_ID_DEV }}"
channelId: live