Skip to content

Reset Demo Database #4852

Reset Demo Database

Reset Demo Database #4852

Workflow file for this run

name: Reset Demo Database
on:
schedule:
# Run every 30 minutes
- cron: '*/30 * * * *'
workflow_dispatch: # Allow manual trigger from GitHub UI
# Minimal permissions for security
permissions:
contents: read
jobs:
reset-demo:
runs-on: ubuntu-latest
# Only run on main branch
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Generate Prisma Client
run: npx prisma generate
- name: Reset Demo Database
run: node scripts/reset-demo-db.mjs
env:
DATABASE_URL: ${{ secrets.DEMO_DATABASE_URL }}
DATABASE_SSL: 'true'
- name: Log completion
run: |
echo "✅ Demo database reset completed at $(date -u +"%Y-%m-%dT%H:%M:%SZ")"