Skip to content

Update Journal

Update Journal #60

name: Update Journal
on:
schedule:
# Run every 2 days at 9:00 AM JST (00:00 UTC)
# - cron: '0 0 */2 * *'
# Alternative: Daily at 9:00 AM JST (00:00 UTC)
- cron: '0 0 * * *'
workflow_dispatch:
# Allow manual triggering
jobs:
update-journal:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Update journal
run: bun run update-journal
- name: Check for changes
id: verify-changed-files
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "changed=true" >> $GITHUB_OUTPUT
echo "Changes detected in journal.mdx"
else
echo "changed=false" >> $GITHUB_OUTPUT
echo "No changes detected"
fi
- name: Commit changes
if: steps.verify-changed-files.outputs.changed == 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add content/docs/journal.mdx
git commit -m "chore: update journal from RSS feed
🤖 Automated journal update from しずかなインターネット RSS feed
Generated with [Claude Code](https://claude.ai/code)"
- name: Push changes
if: steps.verify-changed-files.outputs.changed == 'true'
run: git push