From 2e38c54b67cca3c13a68579940d7bc6748edf3f2 Mon Sep 17 00:00:00 2001 From: Cosmo Date: Fri, 1 May 2026 15:07:23 +0000 Subject: [PATCH] fix: replace actions/checkout with git clone (no node in runner) --- .gitea/workflows/deploy-interior.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy-interior.yml b/.gitea/workflows/deploy-interior.yml index 08d8e6c..5ee6dc2 100644 --- a/.gitea/workflows/deploy-interior.yml +++ b/.gitea/workflows/deploy-interior.yml @@ -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 }}