-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (41 loc) · 1.24 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: ci
on:
schedule:
- cron: '0 0 * * *' # Run every day at midnight UTC
workflow_dispatch:
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
SUPABASE_USERS_EMAIL: ${{ secrets.SUPABASE_USERS_EMAIL }}
SUPABASE_USERS_PASSWORD: ${{ secrets.SUPABASE_USERS_PASSWORD }}
jobs:
update-db:
name: Update Static Database
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
cd deploy/
python -m pip install --upgrade pip
python -m pip install pipenv
python -m pipenv install
- name: Update Database
run: |
cd deploy/
git pull
python -m pipenv run python update_db.py
python -m pipenv run python update_org_pages.py
- name: Commit and push changes
run: |
git config --global user.email "actions@transcf.org"
git config --global user.name "GitHub Actions"
git add *
git commit -m "Update database"
git push