Skip to content

Commit

Permalink
Create scrape.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
TomGoBravo authored Aug 29, 2023
1 parent 0a8bf0c commit f600a8c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/scrape.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Based on https://github.com/simonw/ca-fires-history file .github/workflows/scrape.yml

name: Scrape latest data

on:
push:
workflow_dispatch:
schedule:
- cron: '0 * * * *'

jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@v3
- name: Fetch latest uwhnews.more-sport.com data
run: |-
curl 'https://uwhnews.more-sport.com/where-to-flick/' > uwhnews.more-sport.com.where-to-flick.html
- name: Fetch latest belgiumuwh.be data
run: |-
curl 'https://www.belgiumuwh.be/clubs-in-belgium/' > belgiumuwh.be.clubs-in-belgium.html
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u +'%FT%TZ')
git commit -m "Latest data: ${timestamp}" || exit 0
git push

0 comments on commit f600a8c

Please sign in to comment.