-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.72 KB
/
firebase-hosting-pull-request.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
name: Deploy to Firebase Hosting on PR
'on': pull_request
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4 # TODO We probably want this to be pyenv?
with:
python-version: '3.8'
- uses: actions/setup-node@v2 # TODO: We probably want this to be nvm and match our nvm setup?
with:
node-version: '18.12.1'
cache: 'npm'
- name: Install Dependencies
run: |
npm install --legacy-peer-deps
pip install -r requirements.txt
- name: Gatsby Clean
run: make clean
- name: Build
run: make build
env:
FIREBASE_API_KEY: '${{ secrets.FIREBASE_API_KEY }}'
FIREBASE_AUTH_DOMAIN: '${{ secrets.FIREBASE_AUTH_DOMAIN }}'
FIREBASE_DATABASE_URL: '${{ secrets.FIREBASE_DATABASE_URL }}'
FIREBASE_PROJECT_ID: '${{ secrets.FIREBASE_PROJECT_ID }}'
FIREBASE_STORAGE_BUCKET: '${{ secrets.FIREBASE_STORAGE_BUCKET }}'
FIREBASE_MESSAGING_SENDER_ID: '${{ secrets.FIREBASE_MESSAGING_SENDER_ID }}'
FIREBASE_APP_ID: '${{ secrets.FIREBASE_APP_ID }}'
FIREBASE_MEASUREMENT_ID: '${{ secrets.FIREBASE_MEASUREMENT_ID }}'
FIREBASE_CLIENT_EMAIL: '${{ secrets.FIREBASE_CLIENT_EMAIL }}'
FIREBASE_PRIVATE_KEY: '${{ secrets.FIREBASE_PRIVATE_KEY }}'
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_TOBYDRANE_PERSONAL_SITE }}'
projectId: tobydrane-personal-site