From 284aa226c1bb221668f7e909f999c655cefe08ac Mon Sep 17 00:00:00 2001 From: ProdByGodfather Date: Sat, 11 Jan 2025 13:48:22 +0330 Subject: [PATCH] requirements change 14 --- .github/workflows/publish.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 48e69d7..97f017e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -47,9 +47,15 @@ jobs: - name: Replace site contents run: | - rm -rf * - cp -r ../site/* ./ || echo "No files to copy from '../site'." + # Safely remove files except .git and other essential files + find . -mindepth 1 ! -name '.git' ! -name '.gitignore' -exec rm -rf {} + echo "google-site-verification: googlee5febdfb3cd460f8.html" > googlee5febdfb3cd460f8.html + # Ensure site directory exists and copy its contents + if [ -d ../site ]; then + cp -r ../site/* ./ + else + echo "Build directory '../site' does not exist or is empty." + fi - name: Commit changes run: |