-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 1.3 KB
/
firebase-hosting-pull-request.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
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase Hosting on PR
'on': pull_request
jobs: # 各ジョブは仮想環境の新しいインスタンスで実行される。
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
env:
RUN_HOME: 'portfolio-ui'
runs-on: ubuntu-latest
steps:
- name: Env Info.
run: echo ${{ env.RUN_HOME }}
- uses: actions/checkout@v2
- name: Setup node.
uses: actions/setup-node@v2
with:
node-version: '14.18.0'
cache: 'yarn'
cache-dependency-path: ${{ env.RUN_HOME }}/yarn.lock
# どうやら-nameごとで階層は共有されないらしい
- name: Install module. & Bundle file create. & hosting establishment
run: yarn install --frozen-lockfile && yarn build:pro:hosting
working-directory: ./${{ env.RUN_HOME }}
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_VIDE_PRD }}'
projectId: '${{ secrets.FIREBASE_PROJECT_ID }}'
# working directory指定
entrypoint: ./${{ env.RUN_HOME }}