fix: replace actions/checkout with git clone (no node in runner)
This commit is contained in:
@@ -11,14 +11,18 @@ jobs:
|
|||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- 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
|
- name: Update interior site
|
||||||
run: |
|
run: |
|
||||||
|
VAULT=/tmp/obsidian-deploy-${{ github.run_id }}
|
||||||
|
|
||||||
# Синхронизировать контент из vault
|
# Синхронизировать контент из vault
|
||||||
rm -rf /opt/digital-home/interior/content/notes
|
rm -rf /opt/digital-home/interior/content/notes
|
||||||
mkdir -p /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 есть
|
# Убедиться что index.md есть
|
||||||
if [ ! -f /opt/digital-home/interior/content/index.md ]; then
|
if [ ! -f /opt/digital-home/interior/content/index.md ]; then
|
||||||
@@ -52,3 +56,7 @@ INDEXEOF
|
|||||||
--label traefik.http.services.interior.loadbalancer.server.port=80 \
|
--label traefik.http.services.interior.loadbalancer.server.port=80 \
|
||||||
interior:latest
|
interior:latest
|
||||||
echo 'Deploy done'
|
echo 'Deploy done'
|
||||||
|
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: rm -rf /tmp/obsidian-deploy-${{ github.run_id }}
|
||||||
|
|||||||
Reference in New Issue
Block a user