Skip to content

Commit 85e27fc

Browse files
authored
Merge pull request #197 from Kenny-NISLab/develop
Develop
2 parents fc09c16 + 43f5ddc commit 85e27fc

9 files changed

+2587
-21328
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest]
15-
node: [12.x]
15+
node: [15.x]
1616

1717
steps:
1818
- name: Checkout 🛎

.github/workflows/deploy_on_dev.yml

+25-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node: [12.x]
18+
node: [15.x]
1919

2020
steps:
2121
- uses: actions/checkout@v2
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
node-version: ${{ matrix.node }}
2626
check-latest: true
27-
27+
2828
- name: Create .env file
2929
run: echo '${{ secrets.ENV_DEV }}' > .env
3030

@@ -55,6 +55,29 @@ jobs:
5555
channelId: live
5656
projectId: lab-assignment-dev
5757

58+
deploy_to_functions:
59+
runs-on: ubuntu-latest
60+
61+
strategy:
62+
matrix:
63+
node-version: [14.x]
64+
65+
steps:
66+
- uses: actions/checkout@v2
67+
68+
- name: Install npm packages
69+
run: |
70+
cd functions
71+
npm install
72+
73+
- name: Deploy to Cloud Functions
74+
uses: w9jds/firebase-action@master
75+
with:
76+
args: deploy --only functions
77+
env:
78+
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
79+
PROJECT_ID: lab-assignment-dev
80+
5881
delete_preview_env:
5982
runs-on: ubuntu-latest
6083

@@ -76,4 +99,3 @@ jobs:
7699

77100
- name: Delete preview
78101
run: firebase hosting:channel:delete ${{ github.event.number }} --token ${{ secrets.FIREBASE_TOKEN }} -f
79-

.github/workflows/deploy_on_dev_preview.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
os: [ubuntu-latest]
18-
node: [12.x]
18+
node: [15.x]
1919

2020
steps:
2121
- uses: actions/checkout@v2

.github/workflows/deploy_on_prod.yml

+22-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node: [12.x]
18+
node: [15.x]
1919

2020
steps:
2121
- uses: actions/checkout@v2
@@ -55,4 +55,25 @@ jobs:
5555
channelId: live
5656
projectId: lab-assignment-prod
5757

58+
deploy_to_functions:
59+
runs-on: ubuntu-latest
5860

61+
strategy:
62+
matrix:
63+
node-version: [14.x]
64+
65+
steps:
66+
- uses: actions/checkout@v2
67+
68+
- name: Install npm packages
69+
run: |
70+
cd functions
71+
npm install
72+
73+
- name: Deploy to Cloud Functions
74+
uses: w9jds/firebase-action@master
75+
with:
76+
args: deploy --only functions
77+
env:
78+
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
79+
PROJECT_ID: lab-assignment-prod

README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232

3333
| パッケージ | バージョン |
3434
| ---------- | ---------- |
35-
| `yarn` | 1.22.10 |
36-
| `node` | v12.22.7 |
35+
| `yarn` | 1.22.17 |
36+
| `node` | v15.14.0 |
3737
| `firebase` | 9.6.1 |
3838

3939
> `firebase`に関しては,8 系と 9 系でコードの書き方が大きく異なるので,注意すること
@@ -108,14 +108,14 @@ nodebrew setup
108108
nodebrew ls-remote
109109

110110
# Nodeのインストール
111-
nodebrew install-binary v12.22.7
112-
nodebrew compile v12.22.7 # M1の場合はこちら
111+
nodebrew install-binary v15.14.0
112+
nodebrew compile v15.14.0 # M1の場合はこちら
113113

114114
# インストールしたバージョンの確認
115115
nodebrew ls
116116

117117
# 使いたいバージョンを指定
118-
nodebrew use v12.22.7
118+
nodebrew use v15.14.0
119119

120120
# nodeのバージョンを確認
121121
node -v
@@ -152,7 +152,7 @@ npm install -g firebase-tools
152152
#### 1. リポジトリのクローン
153153

154154
- `git`にて,リポジトリのクローンを行う
155-
- GitHubにssh接続ができるように設定しておきましょう
155+
- GitHub に ssh 接続ができるように設定しておきましょう
156156

157157
```bash
158158
git clone [email protected]:Kenny-NISLab/lab-assignment.git
@@ -221,7 +221,7 @@ control + C
221221

222222
![image](https://user-images.githubusercontent.com/49640294/150631310-09a23a79-2f52-4403-aa20-65d58efbe601.png)
223223

224-
#### 4. VSCodeで開発に必要な拡張ツール
224+
#### 4. VSCode で開発に必要な拡張ツール
225225

226226
開発するにあたり,以下の拡張ツールをインストールしておいてください
227227

@@ -554,11 +554,13 @@ git push origin feature/#(チケット番号)
554554

555555
- ファイル名:`deploy_on_dev.yml`
556556
- 開発環境へデプロイ
557+
- 開発環境に Cloud Functions をデプロイ
557558
- プレビュー環境の削除
558559

559560
- `main`ブランチに投げた PR をクローズした際(マージした際)
560561
- ファイル名:`deploy_on_prod.yml`
561562
- 本番環境へデプロイ
563+
- 本番環境に Cloud Functions をデプロイ
562564

563565
---
564566

firebase.json

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
"indexes": "firestore.index.json"
2020
},
2121
"functions": {
22-
"predeploy": [
23-
"npm --prefix \"$RESOURCE_DIR\" run lint"
24-
],
2522
"source": "functions"
2623
}
2724
}

0 commit comments

Comments
 (0)