-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (52 loc) · 1.59 KB
/
deploy-dev-site.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
56
57
58
59
name: Build and Deploy Dev Site
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build UI
run: |
npm ci
npm run build
env:
CI: true
VITE_APIKEY: ${{ secrets.FIREBASE_WEB_API_KEY_DEV }}
VITE_AUTHDOMAIN: "coreofscience-dev.firebaseapp.com"
VITE_DATABASEURL: "https://coreofscience-dev.firebaseio.com"
VITE_PROJECTID: "coreofscience-dev"
VITE_STORAGEBUCKET: "coreofscience-dev.appspot.com"
VITE_MESSAGINGSENDERID: "421154467745"
VITE_APPID: "1:421154467745:web:d7dd5ed17243869ba765e0"
VITE_MEASUREMENTID: "G-N2245DYRQN"
- name: Prepare functions
shell: bash
run: |
cd functions
python3.12 -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt
cd ..
- name: Deploy
shell: bash
run: |
echo $RAW_CREDENTIALS > $GOOGLE_APPLICATION_CREDENTIALS
npm run deploy -- -P dev
rm $GOOGLE_APPLICATION_CREDENTIALS
env:
RAW_CREDENTIALS: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_COREOFSCIENCE_DEV }}
GOOGLE_APPLICATION_CREDENTIALS: .credentials.json