Files
create/.gitea/workflows/sync-silo-docs.yml
forbes-0023 3406df52aa
Some checks failed
Build and Test / build (pull_request) Has been cancelled
fix: replace sparse-checkout with shallow clone for silo docs
git sparse-checkout fails on individual files (README.md, ROADMAP.md)
with 'is not a directory' error. A shallow clone is simpler and the
silo repo is small enough that it's fine.
2026-02-09 12:56:13 -06:00

54 lines
1.7 KiB
YAML

name: Sync Silo Server Docs
on:
workflow_dispatch:
schedule:
- cron: "0 6 * * *" # Daily at 06:00 UTC as fallback
jobs:
sync:
runs-on: docs
steps:
- name: Checkout create repo
run: |
REPO_URL="http://gitea:3000/kindred/create.git"
if [ -d .git ]; then
git fetch "$REPO_URL" main
git checkout -f FETCH_HEAD
else
git clone --depth 1 --branch main "$REPO_URL" .
fi
- name: Clone Silo server docs
run: |
rm -rf /tmp/silo
git clone --depth 1 http://gitea:3000/kindred/silo.git /tmp/silo
mkdir -p docs/src/silo-server
cp /tmp/silo/docs/*.md docs/src/silo-server/
cp /tmp/silo/README.md docs/src/silo-server/overview.md
cp /tmp/silo/ROADMAP.md docs/src/silo-server/ROADMAP.md 2>/dev/null || true
cp /tmp/silo/frontend-spec.md docs/src/silo-server/frontend-spec.md 2>/dev/null || true
rm -rf /tmp/silo
- name: Check for changes
id: diff
run: |
git add docs/src/silo-server/
if git diff --cached --quiet; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push
if: steps.diff.outputs.changed == 'true'
run: |
git config user.name "Kindred Bot"
git config user.email "bot@kindred-systems.com"
git commit -m "docs: sync Silo server documentation
Auto-synced from kindred/silo main branch."
PUSH_URL="http://kindred-bot:${{ secrets.RELEASE_TOKEN }}@gitea:3000/kindred/create.git"
git push "$PUSH_URL" HEAD:main