Update Data #107
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Data | |
on: | |
schedule: | |
- cron: "0 15 * * 1-5" # Runs at 11 am, Monday through Friday, UTC-4 | |
workflow_dispatch: | |
jobs: | |
update: | |
name: Update Data | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Run Python script to fetch data | |
run: | | |
cd automation | |
python datafetch.py | |
- name: Run Python script for modelling | |
run: | | |
cd automation | |
python modelling.py | |
- name: Commit changes | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "MAKE Prediction" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |