diff --git a/.github/workflows/setupDeploy.yml b/.github/workflows/setupDeploy.yml index 81e5a12..e1cfe40 100644 --- a/.github/workflows/setupDeploy.yml +++ b/.github/workflows/setupDeploy.yml @@ -1,13 +1,13 @@ -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 @@ -15,8 +15,8 @@ jobs: - 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" \ No newline at end of file + - name: Insert Sample DB + run: npx ts-node insert_sample_db.ts