Skip to content

Scrap latest data from pollen.lu and commit changes #11458

Scrap latest data from pollen.lu and commit changes

Scrap latest data from pollen.lu and commit changes #11458

Workflow file for this run

name: Scrap latest data from pollen.lu and commit changes
on:
schedule:
- cron: '0 * * * *' # every hour
jobs:
update-data:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.5
- name: NPM install
run: npm ci
- name: Scrap latest data from pollen.lu
run: npm run scrap-latest-data
- name: Check if there are any changes
id: verify_diff
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit updated data
if: steps.verify_diff.outputs.changed == 'true'
run: |
git config --global user.name 'Pollen.lu scrapper'
git config --global user.email '[email protected]'
git add .
git commit -am "Update pollen.lu data"
git push