-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (56 loc) · 1.99 KB
/
frontend-build-deploy.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
60
61
62
63
name: frontend_build_deploy
on:
push:
paths:
- 'frontend/**'
- '.github/workflows/frontend*'
pull_request:
paths:
- 'frontend/**'
- '.github/workflows/frontend*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
frontend_build_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: yarn build
run: |
cd frontend
yarn install --immutable
yarn build
- name: Deploy to preview channel
if: github.event_name == 'pull_request' && (github.ref_name == 'development' || github.ref_name == 'dev')
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_TORMAP_36F44 }}'
projectId: tormap-36f44
entryPoint: ./frontend
expires: 30d
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
- name: Deploy to dev.tormap.org
if: github.event_name == 'push' && (github.ref_name == 'development' || github.ref_name == 'dev')
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_TORMAP_DEV }}'
projectId: tormap-dev
entryPoint: ./frontend
channelId: live
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
- name: Deploy to tormap.org
if: github.event_name == 'push' && (github.ref_name == 'master' || github.ref_name == 'main')
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_TORMAP_36F44 }}'
projectId: tormap-36f44
entryPoint: ./frontend
channelId: live
env:
FIREBASE_CLI_PREVIEWS: hostingchannels