dining_data #5678
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Data | |
on: | |
repository_dispatch: | |
types: [dining_data] | |
jobs: | |
fetch: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x] | |
steps: | |
- uses: webfactory/ssh-agent@v0.7.0 | |
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 |