Skip to content

Reset Database and Cloudinary #2076

Reset Database and Cloudinary

Reset Database and Cloudinary #2076

Workflow file for this run

name: Reset Database and Cloudinary
on:
schedule:
- cron: '0 * * * *' # Every hour
workflow_dispatch:
jobs:
reset-db:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18.x'
- name: Navigate to API directory, install dependencies, and run reset script
env:
MONGODB_URI: ${{ secrets.MONGODB_URI }}
CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }}
CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }}
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }}
ADMIN_ID: ${{ secrets.ADMIN_ID }}
ADMIN_EMAIL: ${{ secrets.ADMIN_EMAIL }}
ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }}
EXAMPLE_COURSE_ID: ${{ secrets.EXAMPLE_COURSE_ID }}
run: |
cd api
npm install
node scripts/resetData.js