Scrape centers #1129
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: Scrape centers | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 1 * * *' | |
jobs: | |
scrape: | |
if: false | |
name: Scrape centers | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- run: pip3 install -r requirements.txt | |
- name: Scrape the data | |
run: python3 scrape_centers.py | |
env: | |
VGR_CLIENT_ID: ${{ secrets.VGR_CLIENT_ID }} | |
VGR_CLIENT_SECRET: ${{ secrets.VGR_CLIENT_SECRET }} | |
- 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 centers.json | |
git commit -am "Updating the centers" | |
git push |