16 lines
368 B
Bash
Executable File
16 lines
368 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
VAULT_PATH="${VAULT_PATH:-/home/kang/apps/content-forge/content-forge}"
|
|
|
|
cd "$VAULT_PATH"
|
|
|
|
# Skip if no changes
|
|
if git diff --quiet && git diff --cached --quiet && [ -z "$(git ls-files --others --exclude-standard)" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
git add -A
|
|
git commit -m "vault: auto-sync $(date '+%Y-%m-%d %H:%M')"
|
|
git push origin main
|