This commit is contained in:
@@ -25,17 +25,20 @@ jobs:
|
|||||||
git config user.name "gitea-actions[bot]"
|
git config user.name "gitea-actions[bot]"
|
||||||
git config user.email "actions@noreply.gitea.io"
|
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
|
git checkout --orphan docs-static
|
||||||
|
|
||||||
# Remove ALL tracked files from index + working tree
|
# Remove tracked files
|
||||||
git rm -rf . 2>/dev/null || true
|
git rm -rf . 2>/dev/null || true
|
||||||
|
|
||||||
# Clean untracked files too (important!)
|
# Clean working directory
|
||||||
rm -rf *
|
rm -rf *
|
||||||
|
|
||||||
# Copy only site contents (not the folder itself)
|
# Copy ONLY built output back in
|
||||||
cp -r site/. .
|
cp -r /tmp/site_build/. .
|
||||||
|
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Automated MkDocs build"
|
git commit -m "Automated MkDocs build"
|
||||||
|
|||||||
Reference in New Issue
Block a user