[paris2024] scrap country medals #6532
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: "[paris2024] scrap country medals" | |
on: | |
schedule: | |
- cron: "*/10 * * * *" | |
workflow_dispatch: | |
repository_dispatch: | |
jobs: | |
scrap_commit: | |
name: "scrap and commit new data" | |
runs-on: "ubuntu-latest" | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the | |
# added or changed files to the repository. | |
contents: write | |
steps: | |
- uses: "actions/checkout@v4" | |
with: | |
ref: ${{ github.head_ref }} | |
- uses: "actions/setup-python@v2" | |
with: | |
python-version: "3.9" | |
- name: "install dependencies" | |
run: | | |
pip install pandas beautifulsoup4 pytest-playwright | |
- name: "install firefox" | |
run: | | |
playwright install firefox | |
- name: "scrap medals and medallists" | |
run: | | |
cd recipes && python prep_medallist.py | |
- name: "scrap medals by countries" | |
run: | | |
cd recipes && python prep_medals_countries.playwright.py | |
- name: "get back to root" | |
run: | | |
cd .. | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "🤖📰 ajoute les derniers résultats" | |
commit_author: github-actions <[email protected]> | |
file_pattern: "**/*.csv *.csv" |