Skip to content

Scheduled Seed Database #237

Scheduled Seed Database

Scheduled Seed Database #237

Workflow file for this run

name: Scheduled Seed Database
on:
schedule:
- cron: '30 4 * * *' # This corresponds to 9:30 AM IST
jobs:
seed-database:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18' # Node.js version
- name: Install dependencies
run: |
cd backend
npm install
- name: Run seed.js
run: |
cd backend
node seed.js
env:
MONGODB_URI: ${{ secrets.MONGODB_URI }} # Using the mongodb secret