Skip to content

daily

daily #620

Workflow file for this run

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