.github/workflows/actions.yml #800
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
on: | |
schedule: | |
- cron: '0 1 * * *' | |
push: | |
branches: | |
- master | |
jobs: | |
update: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: Build the data and create local changes | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.6' | |
architecture: x64 | |
- name: Install requirements | |
run: | | |
pip install -r requirements.txt | |
- name: Process Data | |
run: | | |
python oil_prices_flow.py | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git commit --allow-empty -m "Auto-update of the data packages" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
deploy: | |
needs: update | |
runs-on: ubuntu-20.04 | |
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}} |