Fetch data #1036
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: Fetch data | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 1 * * *' | |
jobs: | |
scrape: | |
name: Fetch data | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- run: pip3 install --pre -r requirements.txt | |
- name: Fetch data | |
run: python3 run.py | |
- uses: helaili/jekyll-action@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
target_branch: 'gh-pages' | |
- name: Commit the data | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_seconds: 10 | |
max_attempts: 5 | |
command: | | |
git config --global user.name 'Pierre Mesure (Github Actions)' | |
git config --global user.email '[email protected]' | |
git config --global rebase.autoStash true | |
git pull --rebase | |
git add -A | |
git commit -am "Updating the data" | |
git push |