daily #521
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 13 * * *' | |
permissions: | |
contents: write | |
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 and create csvs for visualization | |
run: jupyter nbconvert --to notebook --execute "1-cbp-scrape.ipynb" --stdout | |
- name: Adding today's data to larger csv | |
run: jupyter nbconvert --to notebook --execute "2-cbp-over-time.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 |