Skip to content

sync: include index.md in sync and optimize workflow, update notes #53

sync: include index.md in sync and optimize workflow, update notes

sync: include index.md in sync and optimize workflow, update notes #53

name: Sync Logseq → Quartz Content
on:
push:
branches:
- Admin
paths:
- "pages/**"
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Admin (Logseq source)
uses: actions/checkout@v4
with:
ref: Admin
path: logseq-source
fetch-depth: 1
- name: Checkout Web-live (Quartz site)
uses: actions/checkout@v4
with:
ref: Web-live
path: quartz-site
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 1
- name: Sync and Deploy
run: |
# Sync pages/ to content/ (including index.md)
rsync -av --delete logseq-source/pages/ quartz-site/content/
cd quartz-site
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add content/
if ! git diff --staged --quiet; then
COMMIT_SHA=$(cd ../logseq-source && git rev-parse --short HEAD)
git commit -m "sync: updated from Logseq (Admin@$COMMIT_SHA)"
git push origin Web-live
else
echo "No changes detected — skipping deploy."
fi