fix: copy md files to content root (no notes/ subdir)

This commit is contained in:
Cosmo
2026-05-01 15:14:39 +00:00
parent c1afcba34d
commit 747f93d4be

View File

@@ -19,14 +19,15 @@ jobs:
run: | run: |
VAULT=/tmp/obsidian-deploy-${{ github.run_id }} VAULT=/tmp/obsidian-deploy-${{ github.run_id }}
# Синхронизировать контент из vault # Синхронизировать контент из vault (в корень content/, без notes/)
rm -rf /opt/digital-home/interior/content/notes find /opt/digital-home/interior/content/ -maxdepth 1 -name '*.md' ! -name 'index.md' -delete
mkdir -p /opt/digital-home/interior/content/notes rm -rf /opt/digital-home/interior/content/images
cp -r "$VAULT/Ремонт квартира/." /opt/digital-home/interior/content/notes/ cp -r "$VAULT/Ремонт квартира/"*.md /opt/digital-home/interior/content/
cp -r "$VAULT/Ремонт квартира/images" /opt/digital-home/interior/content/images 2>/dev/null || true
# Убедиться что index.md есть # Убедиться что index.md есть
if [ ! -f /opt/digital-home/interior/content/index.md ]; then if [ ! -f /opt/digital-home/interior/content/index.md ]; then
printf '---\ntitle: Ремонт квартиры\n---\n\n# Ремонт квартиры\n\n- [[notes/Интерьер]]\n- [[notes/Интерьер кухня]]\n- [[notes/Интерьер спальни]]\n' \ printf '---\ntitle: Ремонт квартиры\n---\n\n# Ремонт квартиры\n\n- [[Интерьер]]\n- [[Интерьер кухня]]\n- [[Интерьер спальни]]\n- [[План квартиры]]\n' \
> /opt/digital-home/interior/content/index.md > /opt/digital-home/interior/content/index.md
fi fi