mirror of
https://github.com/Brandon-Rozek/website-observations.git
synced 2024-11-09 11:10:33 -05:00
36 lines
831 B
YAML
36 lines
831 B
YAML
|
name: Sync Observations from iNaturalist
|
||
|
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
schedule:
|
||
|
- cron: "12 23 * * *"
|
||
|
|
||
|
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: |
|
||
|
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
|
||
|
|
||
|
- name: Commit and push
|
||
|
if: steps.verify_diff.outputs.changed == 'true'
|
||
|
run: |
|
||
|
git add *.md
|
||
|
git commit -m "New/Modified Observations"
|
||
|
git push origin gh_actions
|