-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (49 loc) · 1.95 KB
/
firebase-hosting-merge.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
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase Hosting on merge
'on':
push:
branches:
- production
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NODE_VERSION:$(cat .nvmrc)
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{steps.node_version.outputs.NODE_VERSION}}
- name: Adding environments to .env
run: |
echo -e "\\n
NEXT_PUBLIC_FIREBASE_API_KEY=${{ secrets.FIREBASE_API_KEY }}\n\
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=${{ vars.FIREBASE_AUTH_DOMAIN }}\n\
NEXT_PUBLIC_FIREBASE_DATABASE_URL=${{ vars.FIREBASE_DATABASE_URL }}\n\
NEXT_PUBLIC_FIREBASE_PROJECT_ID=${{ vars.FIREBASE_PROJECT_ID }}\n\
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=${{ vars.FIREBASE_STORAGE_BUCKET }}\n\
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=${{ vars.FIREBASE_MEASUREMENT_ID }}\n\
NEXT_PUBLIC_FIREBASE_APP_ID=${{ vars.FIREBASE_APP_ID }}\n\
NEXT_PUBLIC_KAKAO_API_KEY=${{ secrets.KAKAO_API_KEY }}\n\
NEXT_PUBLIC_SENTRY_DSN=${{ vars.SENTRY_DSN }}\n\
SENTRY_AUTH_TOKEN=${{secrets.SENTRY_AUTH_TOKEN}}\n\
PROD=${{ true }}" >> ".env"
- name: Debugging .env fle
run: cat ".env"
- name: Install dependencies
run: yarn install
- name: Build application
run: yarn run build
- name: Deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_OPPAMANYCOLORTONE_5FB42 }}'
channelId: live
projectId: oppamanycolortone-5fb42
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks