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

33 lines
981 B
YAML
Raw Normal View History

2022-05-22 22:41:06 +00:00
name: Demo reset
on:
2022-06-02 15:56:55 +00:00
# schedule:
# - cron: "0 * * * *"
workflow_dispatch:
2022-05-22 22:41:06 +00:00
jobs:
reset:
name: Reset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
2022-05-22 22:41:06 +00:00
with:
python-version: "3.10"
- uses: actions/cache@v3
with:
path: ~/.local/share/virtualenvs
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"
2022-06-02 17:29:48 +00:00
- name: Install Railway CLI
run: npm i -g @railway/cli
- name: Reset demo database
2022-06-02 18:41:30 +00:00
run: npx railway run pipenv run python manage.py reset --no-input
2022-06-02 17:29:48 +00:00
env:
DJANGO_SETTINGS_MODULE: babybuddy.settings.railway
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}