-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.7 KB
/
train-spread-predictor.yaml
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
61
62
63
name: NFL Spread Predictor Pipeline
on:
# schedule:
# - cron: '0 0 * * 2'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
- name: Install dependencies with Poetry
run: poetry install
- name: Download data
# TODO: mkdir should not be necessary but gh action hangs when doing os.makedirs
run: |
mkdir ./nfl_analytics/data
ls -a
ls -a ./nfl_analytics
poetry run python ./nfl_analytics/main.py --download
# TODO: should be able to combine w/ main.py --download
- name: Train Model
run: poetry run python ./nfl_analytics/main.py --train
# TODO: tag name? release name?
- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: ./nfl_analytics/assets/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload model, scaler, and running average dataframe
id: upload_assets
uses: actions/upload-artifact@v4
with:
name: assets
path: ./nfl_analytics/assets/*
- name: Attach assets to release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ needs.upload_assets.outputs.artifact_paths }}
asset_name: assets
asset_content_type: application/zip