-
Notifications
You must be signed in to change notification settings - Fork 26
43 lines (34 loc) · 990 Bytes
/
update-data.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
name: Update Data
on:
repository_dispatch:
types: [dining_data]
jobs:
fetch:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- uses: actions/checkout@v3
with:
submodules: true
- name: Install Typescript & serverless
run: |
npm i -g typescript
npm i -g serverless
- name: Install Dependencies
run: npm i
- name: Copy production env
run: |
echo -e "${{secrets.ENV}}" > .env
echo -e "MENU_ID=${{github.event.client_payload.id}}" >> .env
echo -e "MENU_YEAR=${{github.event.client_payload.year}}" >> .env
- name: Database migrations and generate db types
run: npx prisma migrate deploy && npx prisma generate
- name: Compile typescript
run: tsc
- name: Update Dining Menu
run: npm run fetch:dining