-
Notifications
You must be signed in to change notification settings - Fork 6
37 lines (31 loc) · 1.03 KB
/
preview.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
name: Firebase Deploy Preview
on:
pull_request:
env:
GCP_PROJECT: carto-dw-tiles3d-demo
NODE_VERSION: "16"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
# Update yarn /npm commands based on your needs
- run: yarn install
- run: yarn build-preview
- name: Setup Firebase for deploying
run: |
npm install -g firebase-tools
# Generate the necessary .firebaserc
firebase --project ${{ env.GCP_PROJECT }} --config firebase.json target:apply hosting default ${{env.GCP_PROJECT }}
- name: Deploy assets to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
target: default
projectId: ${{ env.GCP_PROJECT }}
repoToken: ${{secrets.GITHUB_TOKEN}}
env:
FIREBASE_CLI_PREVIEWS: hostingchannels