File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 5757 steps :
5858 - name : Checkout master branch
5959 uses : actions/checkout@v4
60- with :
61- ref : master
62- token : ${{ secrets.GITHUB_TOKEN }}
63- fetch-depth : 0
64-
6560 - name : Checkout master branch
6661 uses : actions/checkout@v4
6762 with :
@@ -81,11 +76,13 @@ jobs:
8176 git config --local user.email "[email protected] " 8277 git config --local user.name "GitHub Action"
8378
84- # Remove all files except .git
85- find . -maxdepth 1 ! -name '.git' ! -name '.' ! -name '..' -exec rm -rf {} +
79+ # Remove all files except .git and _site
80+ find . -maxdepth 1 ! -name '.git' ! -name '_site' ! -name ' .' ! -name '..' -exec rm -rf {} +
8681
87- # Copy built site files to root
82+ # Copy built site files to root (GitHub Pages expects files in root, not in _site)
8883 cp -r _site/* .
84+
85+ # Remove the _site directory (not needed for GitHub Pages)
8986 rm -rf _site
9087
9188 # Add and commit changes
You can’t perform that action at this time.
0 commit comments