Skip to content

Automated Workflow for s-and-p-500 dataset #345

Automated Workflow for s-and-p-500 dataset

Automated Workflow for s-and-p-500 dataset #345

Workflow file for this run

on:
schedule:
- cron: '0 1 * * *'
push:
branches:
- master
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build the data and create local changes
uses: actions/setup-python@v2
with:
python-version: '3.x'
architecture: x64
- name: Install requirements
run: |
pip install -r scripts/requirements.txt
- name: Process Data
run: |
python scripts/constituents.py
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git diff --quiet && git diff --staged --quiet || git commit -a -m "Auto-update of the data packages"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.gh }}
deploy:
needs: update
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '8.x'
- run: npm install -g data-cli
- run: data --version
- run: data push
env:
id: ${{secrets.dhid}}
username: ${{secrets.dhusername}}
token: ${{secrets.dhtoken}}