-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (64 loc) · 2.84 KB
/
deploy-research-archive.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
64
65
66
name: Deploy Research Archive
on:
workflow_dispatch:
jobs:
deploy-research-archive-app:
name: Deploy research archive
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: pnpm/action-setup@v3
with:
version: 8.15.4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Load secrets
uses: 1password/load-secrets-action@v2
with:
# Export loaded secrets as environment variables
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
# turbo
TURBO_TEAM: op://k33-web-env/prod/turbo/TEAM
TURBO_TOKEN: op://k33-web-env/prod/turbo/TOKEN
TURBO_REMOTE_ONLY: true
# firebase app settings
NEXT_PUBLIC_FIREBASE_API_KEY: op://k33-web-env/prod/firebase/API_KEY
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: op://k33-web-env/prod/firebase/AUTH_DOMAIN
NEXT_PUBLIC_FIREBASE_PROJECT_ID: op://k33-web-env/prod/firebase/PROJECT_ID
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: op://k33-web-env/prod/firebase/STORAGE_BUCKET
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: op://k33-web-env/prod/firebase/MESSAGING_SENDER_ID
NEXT_PUBLIC_FIREBASE_APP_ID: op://k33-web-env/prod/firebase/APP_ID
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: op://k33-web-env/prod/firebase/MEASUREMENT_ID
FIREBASE_SERVICE_ACCOUNT: op://k33-web-env/prod/firebase/SERVICE_ACCOUNT
# domains
NEXT_PUBLIC_WEB_DOMAIN: op://k33-web-env/prod/domain/WEB
NEXT_PUBLIC_API_DOMAIN: op://k33-web-env/prod/domain/API
# contentful
NEXT_PUBLIC_CONTENTFUL_RESEARCH_ARCHIVE_SPACE_ID: op://k33-web-env/prod/contentful/RESEARCH_ARCHIVE_SPACE_ID
NEXT_PUBLIC_CONTENTFUL_RESEARCH_ARCHIVE_ACCESS_TOKEN: op://k33-web-env/prod/contentful/RESEARCH_ARCHIVE_ACCESS_TOKEN
NEXT_PUBLIC_CONTENTFUL_RESEARCH_ARCHIVE_ENVIRONMENT: op://k33-web-env/prod/contentful/RESEARCH_ARCHIVE_ENVIRONMENT
- name: Install dependencies
run: pnpm install
- name: Build local dependencies
run: pnpm --dir packages/ui build
- name: export research-archive
run: pnpm --dir apps/research-archive export
- name: deploy research-archive
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ env.FIREBASE_SERVICE_ACCOUNT }}'
expires: 30d
projectId: '${{ env.NEXT_PUBLIC_FIREBASE_PROJECT_ID }}'
channelId: live
# removing target will deploy all targets defined in .firebaserc
target: 'k33-research-archive'