name: Demo reset on: schedule: - cron: "0 */3 * * *" workflow_dispatch: jobs: reset: name: Reset runs-on: ubuntu-latest environment: name: demo url: https://demo.baby-buddy.net steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v3 id: setup-python with: python-version: '3.x' - uses: actions/cache@v3 with: path: | ~/.local/share/virtualenvs Pipfile.lock key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('**/requirements.txt') }} - name: Install pipenv run: python -m pip install --upgrade pipenv wheel - name: Install dependencies run: pipenv install - 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 run pipenv run python manage.py reset --no-input env: DJANGO_SETTINGS_MODULE: babybuddy.settings.railway RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}