add: cron and commit after sync in deploy workflow

This commit is contained in:
Faust 2026-06-13 09:55:39 +03:00
parent a2d1cf4470
commit 06c4b51228
2 changed files with 17 additions and 1 deletions

View file

@ -6,10 +6,13 @@ on:
branches: [main]
# Ручной запуск
workflow_dispatch:
# Автоматическая синхронизация каждые 6 часов
schedule:
- cron: "0 */6 * * *"
# Разрешения для GitHub Pages
permissions:
contents: read
contents: write
pages: write
id-token: write
@ -42,6 +45,18 @@ jobs:
OBSIDIAN_VAULT_TOKEN: ${{ secrets.OBSIDIAN_VAULT_TOKEN }}
run: bash scripts/sync-obsidian-notes.sh
- name: Commit synced notes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add content/obsidian-notes/
if ! git diff --cached --quiet; then
git commit -m "sync: update obsidian notes [skip ci]"
git push
else
echo "No changes to commit"
fi
- name: Install Quartz plugins
run: npx tsx ./quartz/plugins/loader/install-plugins.ts
env:

1
.gitignore vendored
View file

@ -12,3 +12,4 @@ private/
replit.nix
.quartz/
quartz/cli/tui/dist/
.env