Files
Copilot 2f46e40888 Merge pull request #33 from suyu-emu/copilot/copy-reddit-posts-to-blog
feat(blog): full blog infrastructure with Reddit post mirroring
2026-04-28 10:53:43 +01:00

40 lines
1.1 KiB
YAML

name: Fetch Reddit Blog Posts
on:
workflow_dispatch: # run manually from the Actions tab
schedule:
- cron: "0 4 * * 1" # every Monday at 04:00 UTC
jobs:
fetch:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: dev
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 23
- name: Fetch Reddit post content
run: node scripts/fetch-reddit-posts.mjs
- name: Commit updated blog content
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add src/content/blog/
if git diff --cached --quiet; then
echo "No changes to commit."
else
git commit -m "chore(blog): refresh Reddit post content [skip ci]"
git push
fi