Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/setupDeploy.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: Prepare Database
name: Setup and Deploy

on:
push:
branches:
- deploy

jobs:
"setup-database":
runs-on: cs5500-self-hosted
jobs:
setup-and-deploy:
runs-on: self-hosted
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Install Dependencies
run: npm install

- name: Delete old database
run: npm run remove-sample-data -- "mongodb://127.0.0.1:27017/my_library_db"
- name: Remove Existing DB
run: npx ts-node remove_db.ts

- name: Seed database
run: npm run insert-sample-data -- "mongodb://127.0.0.1:27017/my_library_db"
- name: Insert Sample DB
run: npx ts-node insert_sample_db.ts