Skip to content

Commit e4b9270

Browse files
Refactor file copying logic in deploy.yml
1 parent 14f31a3 commit e4b9270

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ jobs:
5252
# Step 7: Copy non-minifiable files (images, videos) directly
5353
- name: Copy Non-Minifiable Files
5454
run: |
55-
for file in $(find . -type f ! -name "*.html" ! -name "*.css" ! -name "*.js" ! -path "./node_modules/*" ! -path "./.vscode/*" ! -path "./.idea/*" ! -path "./bootstrap/*"); do
56-
mkdir -p "$(dirname $file)"
57-
cp "$file" "$(dirname $file)/"
58-
done
55+
for file in $(find . -type f ! -name "*.html" ! -name "*.css" ! -name "*.js" ! -path "./node_modules/*" ! -path "./.vscode/*" ! -path "./.idea/*" ! -path "./bootstrap/*"); do
56+
dest_dir="$(dirname "./minified/$file")"
57+
mkdir -p "$dest_dir"
58+
cp "$file" "$dest_dir/"
59+
done
5960
6061
# Step 8: Deploy to GitHub Pages
6162
- name: Deploy to GitHub Pages

0 commit comments

Comments
 (0)