-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (37 loc) · 1.12 KB
/
daily.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
name: Download dataset
on:
schedule:
- cron: "0 10 * * *"
jobs:
process:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv install --system --dev
- name: Download dataset from Reddit
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
PASSWORD: ${{ secrets.PASSWORD }}
run: python download_threads.py
- name: Upload dataset to Kaggle
env:
KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }}
KAGGLE_USERNAME: ioexception
run: python upload.py
- name: Commit changes
run: |
msg="Updated: `date +'%Y-%m-%d %H:%M'`"
git config --global user.email "antonio.feregrino@gmail.com"
git config --global user.name "Antonio Feregrino"
git add data/
git diff --quiet && git diff --staged --quiet || git commit -m "$msg"
git push