-
Notifications
You must be signed in to change notification settings - Fork 12
49 lines (48 loc) · 1.93 KB
/
deploy-frontends-many.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
name: Deploy frontends (many)
on:
release:
types: [published]
workflow_dispatch:
jobs:
deploy:
name: Deploy ${{ matrix.project_name }}
uses: ./.github/workflows/base-deploy-to-bucket.yml
with:
env: ${{ matrix.env }}
project_name: ${{ matrix.project_name }}
build_directory: ${{ matrix.build_directory }}
build_command: ${{ matrix.build_command }}
dist_directory: ${{ matrix.dist_directory }}
bucket_name_var: ${{ matrix.bucket_name_var }}
cache_dependency_path: ${{ matrix.cache_dependency_path }}
secrets:
bucket_access_key: ${{ secrets.BUCKET_ACCESS_KEY }}
bucket_secret_key: ${{ secrets.BUCKET_SECRET_KEY }}
strategy:
matrix:
env: [demo, production]
project_name: [attestation, dashboard, techdoc]
include:
- project_name: attestation
build_directory: attestation
build_command: |
NODE_OPTIONS=--openssl-legacy-provider npm run build
dist_directory: attestation/dist/attestation
bucket_name_var: ATTESTATION_BUCKET_NAME
cache_dependency_path: attestation/package-lock.json
- project_name: dashboard
build_directory: dashboard
build_command: |
cat "src/environments/environment.$DEPLOY_ENV.ts" | sed 's/export const /window./' > src/assets/env.js
NODE_OPTIONS=--openssl-legacy-provider npm run build -c production
dist_directory: dashboard/dist/dashboard
bucket_name_var: DASHBOARD_BUCKET_NAME
cache_dependency_path: dashboard/package-lock.json
- project_name: techdoc
build_directory: doc
build_command: |
npm run gen
NODE_OPTIONS=--openssl-legacy-provider npm run build
dist_directory: doc/dist
bucket_name_var: TECHDOC_BUCKET_NAME
cache_dependency_path: doc/package-lock.json