fix: replace actions/checkout with git clone (no node in runner)

This commit is contained in:
Cosmo
2026-05-01 15:07:23 +00:00
parent e05b33c1cd
commit 2e38c54b67

View File

@@ -11,14 +11,18 @@ jobs:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
run: |
git clone --depth=1 https://daniil:${{ secrets.REPO_TOKEN }}@git.digital-home.site/daniil/obsidian.git /tmp/obsidian-deploy-${{ github.run_id }} || \
(cd /tmp/obsidian-deploy-${{ github.run_id }} && git pull)
- name: Update interior site
run: |
VAULT=/tmp/obsidian-deploy-${{ github.run_id }}
# Синхронизировать контент из vault
rm -rf /opt/digital-home/interior/content/notes
mkdir -p /opt/digital-home/interior/content/notes
cp -r "$GITHUB_WORKSPACE/Ремонт квартира/." /opt/digital-home/interior/content/notes/
cp -r "$VAULT/Ремонт квартира/." /opt/digital-home/interior/content/notes/
# Убедиться что index.md есть
if [ ! -f /opt/digital-home/interior/content/index.md ]; then
@@ -52,3 +56,7 @@ INDEXEOF
--label traefik.http.services.interior.loadbalancer.server.port=80 \
interior:latest
echo 'Deploy done'
- name: Cleanup
if: always()
run: rm -rf /tmp/obsidian-deploy-${{ github.run_id }}