Scrape #5724
This file contains hidden or 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: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 6 * * *' | |
| jobs: | |
| scrape: | |
| name: Scrape | |
| runs-on: ubuntu-latest | |
| steps: | |
| - id: checkout | |
| name: Checkout | |
| uses: actions/checkout@v4 | |
| - id: install-uv | |
| name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "latest" | |
| enable-cache: true | |
| cache-dependency-glob: '**/pyproject.toml' | |
| - id: install-python | |
| name: Install Python | |
| run: uv python install 3.10 | |
| - name: Install Python dependencies | |
| run: uv sync | |
| - name: Run scrape command | |
| run: uv run inciweb-wildfires incidents > data/incidents.json | |
| shell: bash | |
| - name: Datestamp | |
| run: date > data/timestamp.txt | |
| shell: bash | |
| - name: Commit results | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "actions@github.com" | |
| git config pull.rebase false | |
| git status | |
| git pull origin $GITHUB_REF | |
| git add ./data | |
| git commit -m "Scrape" && git push || true | |
| shell: bash |