diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 73770f1..ee3f8f9 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -25,17 +25,20 @@ jobs: git config user.name "gitea-actions[bot]" git config user.email "actions@noreply.gitea.io" - # Create fresh orphan branch + # Move built site somewhere safe + mv site /tmp/site_build + + # Create orphan branch git checkout --orphan docs-static - # Remove ALL tracked files from index + working tree + # Remove tracked files git rm -rf . 2>/dev/null || true - # Clean untracked files too (important!) + # Clean working directory rm -rf * - # Copy only site contents (not the folder itself) - cp -r site/. . + # Copy ONLY built output back in + cp -r /tmp/site_build/. . git add . git commit -m "Automated MkDocs build"