daily #618
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 | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 16 * * *' | |
jobs: | |
daily: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out this repo | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install all necessary packages | |
run: pip install jupyter lxml pandas requests beautifulsoup4 playwright html5lib | |
- name: Install browsers | |
run: playwright install | |
- name: Scraping today's data | |
run: jupyter nbconvert --to notebook --execute "1_energy_prices_scrape.ipynb" --stdout | |
- name: Append the data to the csv with all days | |
run: jupyter nbconvert --to notebook --execute "2_several_days.ipynb" --stdout | |
- name: Reformat the data | |
run: jupyter nbconvert --to notebook --execute "3_reformatting_data.ipynb" --stdout | |
- name: Commit and push any changes | |
run: |- | |
git config user.name "Automated" | |
git config user.email "[email protected]" | |
git add -A | |
timestamp=$(date -u) | |
git commit -m "Latest data: ${timestamp}" || exit 0 | |
git push |