Scrape #99
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 | |
on: | |
push: | |
schedule: | |
- cron: "30 12 * * 2" | |
workflow_dispatch: | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
jobs: | |
scrape-latest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: '3.x' | |
- name: Install requirements | |
run: pip install -r requirements.txt | |
- name: Run Scraper | |
run: python scraper.py run-all | |
- name: Commit changes | |
run: | | |
git config --local user.name github-actions | |
git config --local user.email "[email protected]" | |
git add . | |
if [[ "$(git status --porcelain)" != "" ]]; then | |
git commit -m "Update data" -a | |
git push -u origin main | |
fi | |
env: | |
REPO_KEY: ${{secrets.GITHUB_TOKEN}} | |
username: github-actions | |