website-observations/.github/workflows/refresh.yml

36 lines
849 B
YAML
Raw Normal View History

name: Sync Observations from iNaturalist
on:
workflow_dispatch:
schedule:
2023-11-20 09:59:37 -05:00
- cron: "12 2 * * 1"
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Grab latest observations
run: |
./.scripts/refreshobservations.py
- name: Check if there's any changes
id: verify_diff
run: |
2022-12-12 11:37:02 -05:00
if [ -n "$(git status --porcelain)" ]; then echo ::set-output name=changed::true; fi
- name: Commit and push
if: steps.verify_diff.outputs.changed == 'true'
run: |
git add *.md
git commit -m "New/Modified Observations"
2022-12-01 20:40:00 -05:00
git push origin main