Skip to content

Update copy of microblog #34

Update copy of microblog

Update copy of microblog #34

name: Update copy of microblog
on:
workflow_dispatch: {}
schedule:
- cron: "0 * * * *" # Hourly
permissions:
contents: write
jobs:
update_and_render:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Update DB and render
run: python3 mastodon.py --update --download-media
- name: Commit and push
run: |
if ! ( git update-index --refresh && git diff-index --quiet HEAD -- ); then
# Only try to commit & push if there are changes
git config --global user.name 'Max Bernstein'
git config --global user.email '[email protected]'
git add mastodon.json microblog.html assets/mastodon
git commit -m "Update Mastodon microblog"
git push
fi