-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.53 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
50
51
52
53
54
55
56
57
58
59
60
name: Run steam-to-sqlite
on:
schedule:
- cron: "19 * * * *" # every hour
# Allows running this workflow manually from the Actions tab
workflow_dispatch:
jobs:
run:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install
run: |
pip install -r requirements.txt
pip install .
- name: run the script
run: |
wget -qO database.db https://www.dropbox.com/s/i47qt3chrp9lr9e/database.db?dl=1
alembic upgrade head
python steam2sqlite/main.py --limit 45
shell: bash
- name: upload to dropbox
run: |
python scripts/uploader.py database.db /database.db
env:
DROPBOX_ACCESS_TOKEN: ${{ secrets.DROPBOX_ACCESS_TOKEN }}
shell: bash
- uses: actions/upload-artifact@v4
if: failure()
with:
name: database.db
path: database.db
- name: Get flyctl
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy Datasette using Fly
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
run: |-
datasette publish fly database.db \
--install datasette-graphql --install datasette-vega \
--app steam-to-sqlite \
--metadata datasette-data/metadata.json \
--setting sql_time_limit_ms 3500