Skip to content

Commit d9b6731

Browse files
committed
Merge branch 'hotfix/Fix_find_syntax'
2 parents 466859f + 28cf7ae commit d9b6731

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

deploy.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ git push --tag --force origin-pages || exit 1
2222
# Git clone
2323
git clone -b $DEPLOY_BRANCH --single-branch "https://${GH_REPO}" $DEPLOY_FOLDER
2424

25-
# Clean up files from last build(except .git)
26-
find ./$DEPLOY_FOLDER/* ./$DEPLOY_FOLDER/.* ! -path "./${DEPLOY_FOLDER}/.git/*" ! -name ".git" | xargs rm -rf
25+
# Clean up directorys / files from last build (except .git/*)
26+
find ./$DEPLOY_FOLDER -type d ! -path "*/.git*" ! -path "./$DEPLOY_FOLDER" | xargs rm -rf
27+
find ./$DEPLOY_FOLDER -type f ! -path "*/.git/*" | xargs rm -rf
2728

2829
# Copy built files
2930
cp -R ./build/. ./$DEPLOY_FOLDER

0 commit comments

Comments
 (0)