-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (46 loc) · 1.17 KB
/
build.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
name: Build csv, db and deploy
on:
workflow_dispatch:
schedule:
- cron: '48 15 * * 3'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Checkout hdb-resale-prices-data
uses: actions/checkout@v3
with:
repository: darrelhong/hdb-resale-prices-data
path: hdb-resale-prices-data
token: ${{ secrets.GH_PAT }}
- name: Cache zip download
uses: actions/[email protected]
with:
path: ~/downloads
key: ${{ runner.os }}-download-cache
- name: Setup Python
uses: actions/[email protected]
with:
python-version: '3.11'
cache: 'pip'
- name: Install Python dependencies
run: |
pip install -r requirements.txt
- name: Download dataset
run: |
./download.sh
- name: Build csv
run: |
python build_csv.py
- name: Build db
run: |
./build_db.sh
- name: Setup flyctl
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy to fly.io
run: |
./publish_fly.sh
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}