This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user