mybuddy/.github/workflows/demo-reset.yml

24 lines
587 B
YAML

name: Demo reset
on:
# schedule:
# - cron: "0 * * * *"
workflow_dispatch:
jobs:
reset:
name: Reset
runs-on: ubuntu-latest
steps:
- name: Install node v16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Railway CLI
run: npm i -g @railway/cli
- name: Reset demo database
run: |
npx railway link $RAILWAY_PROJECT_ID
npx railway run python manage.py reset --no-input
env:
RAILWAY_PROJECT_ID: ${{ secrets.RAILWAY_PROJECT_ID }}
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}