File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -92,14 +92,14 @@ jobs:
9292 git clean -fd
9393 git fetch origin gh-pages
9494 git checkout gh-pages
95- # Clean all existing content
96- git rm -rf . 2>/dev/null || true
97- rm -rf * .* 2>/dev/null || true
95+ # Clean all existing content (but preserve .git)
96+ find . -maxdepth 1 ! -name '.git' ! -name '.' ! -name '..' -exec rm -rf {} + 2>/dev/null || true
9897 else
9998 echo "gh-pages branch doesn't exist, creating orphan branch..."
10099 git checkout --orphan gh-pages
101100 git rm -rf . 2>/dev/null || true
102- rm -rf * .* 2>/dev/null || true
101+ # Clean all existing content (but preserve .git)
102+ find . -maxdepth 1 ! -name '.git' ! -name '.' ! -name '..' -exec rm -rf {} + 2>/dev/null || true
103103 fi
104104
105105 # Copy generated site files from safe location
You can’t perform that action at this time.
0 commit comments