File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -62,27 +62,29 @@ jobs:
6262 token : ${{ secrets.GITHUB_TOKEN }}
6363 fetch-depth : 0
6464
65- - name : Checkout master branch
66- uses : actions/checkout@v4
67- with :
68- ref : master
69- token : ${{ secrets.GITHUB_TOKEN }}
70- fetch-depth : 0
71-
7265 - name : Download build artifacts
73- uses : actions/download-artifact@v5
66+ uses : actions/download-artifact@v4
7467 with :
7568 name : site-build
7669 path : _site/
7770
71+ - name : Verify build artifacts
72+ run : |
73+ echo "Checking _site directory contents:"
74+ ls -la _site/ || echo "No _site directory found"
75+ if [ ! -d "_site" ] || [ -z "$(ls -A _site)" ]; then
76+ echo "Error: _site directory is empty or missing"
77+ exit 1
78+ fi
79+
7880 - name : Deploy to master branch
7981 run : |
8082 # Configure git
8183 git config --local user.email "[email protected] " 8284 git config --local user.name "GitHub Action"
8385
84- # Remove all files except .git
85- find . -maxdepth 1 ! -name '.git' ! -name '.' ! -name '..' -exec rm -rf {} +
86+ # Remove all files except .git and _site
87+ find . -maxdepth 1 ! -name '.git' ! -name '.' ! -name '..' ! -name '_site' -exec rm -rf {} +
8688
8789 # Copy built site files to root
8890 cp -r _site/* .
You can’t perform that action at this time.
0 commit comments