Scheduled Seed Database #237
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: 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 |