-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (31 loc) · 1.3 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
name: Daily data construction and notebook update
on:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
jobs:
build:
name: Daily data construction and notebook update
runs-on: ubuntu-latest
container: condaforge/mambaforge:latest
steps:
- uses: actions/checkout@v1
- name: Data construction and notebook update
run: |
conda init bash
. ~/.bashrc
conda env create -f environment.yml
conda activate tda_financial_time_series
python -m pip install yfinance
python data_generation.py
jupyter nbconvert --to notebook --inplace --execute tda_web_app.ipynb
- name: Check for modified files
id: git-check
run: echo ::set-output name=modified::$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)
- name: Commit data and notebook
if: steps.git-check.outputs.modified == 'true'
run: |
git config --global user.name 'Continuous Integration'
git config --global user.email 'gudhi-ci@inria.fr'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -am "[skip ci] Data construction and notebook update"
git push origin HEAD:master --force