Daily Python Job #460
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: Daily Python Job | |
on: | |
push: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
run_python_job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: delete data folder | |
run: | | |
rm -rf data | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
python -m ensurepip --upgrade | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run Python script | |
run: | | |
python ./project.py | |
mkdir data | |
mv bitcoin_prices_week.csv data/ | |
mv weekly_statistics.csv data/ | |
mv data.json data/ | |
- name: push to github | |
uses: github-actions-x/[email protected] | |
with: | |
github-token: ${{ secrets.GH_TOKEN }} | |
push-branch: 'main' | |
commit-message: 'publish' | |
files: 'data/bitcoin_prices_week.csv data/weekly_statistics.csv data/data.json' | |
name: giladAlboher | |
email: [email protected] |