Skip to content

Commit bbf858d

Browse files
Dale KunceDale Kunce
authored andcommitted
Fix deployment: use rsync for reliable file copying
- Replace cp command with rsync for more reliable directory copying - Ensures all files including styles folder are properly copied to root - Add enhanced verification to check assets and main.css deployment - Should resolve CSS loading issues on missingmaps.org The rsync command is more robust than cp for CI environments and will properly copy the entire _site directory structure.
1 parent 7487fe1 commit bbf858d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,13 @@ jobs:
108108
# Copy built site files to root with verification
109109
if [ -d "_site" ] && [ "$(ls -A _site)" ]; then
110110
echo "Copying _site contents to root..."
111-
cp -rv _site/* .
112-
cp -rv _site/.[^.]* . 2>/dev/null || true # Copy hidden files if they exist
111+
112+
# Use rsync for more reliable copying
113+
rsync -av --exclude='.git' _site/ .
114+
115+
# Alternative: Use find and cp for better reliability
116+
# find _site -mindepth 1 -maxdepth 1 -exec cp -r {} . \;
117+
113118
echo "Copy completed. Removing _site directory..."
114119
rm -rf _site
115120
else
@@ -120,8 +125,12 @@ jobs:
120125
# Debug: Show final directory structure
121126
echo "=== Final directory structure ==="
122127
ls -la
128+
echo "=== assets directory ==="
129+
ls -la assets/ || echo "No assets directory found"
123130
echo "=== assets/styles directory ==="
124131
ls -la assets/styles/ || echo "No assets/styles directory found"
132+
echo "=== Checking for main.css ==="
133+
find . -name "main.css" -type f || echo "main.css not found"
125134
126135
# Add and commit changes
127136
git add -A

0 commit comments

Comments
 (0)