Skip to content

Commit 6bb6aff

Browse files
committed
fix: improve artifact handling with better retention and verification steps
1 parent bcfd778 commit 6bb6aff

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/deploy-pages.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,14 @@ jobs:
9696
with:
9797
name: site-build
9898
path: ./public
99-
retention-days: 1
99+
retention-days: 7
100+
if-no-files-found: error
101+
102+
- name: Verify artifact upload
103+
run: |
104+
echo "📦 Verifying artifact upload..."
105+
ls -la ./public/ || echo "⚠️ Public directory not found"
106+
echo "✅ Artifact upload verification completed"
100107
101108
# 部署作业
102109
deploy:
@@ -120,6 +127,16 @@ jobs:
120127
name: site-build
121128
path: ./site-build
122129

130+
- name: Verify downloaded artifacts
131+
run: |
132+
echo "📦 Verifying downloaded artifacts..."
133+
if [ ! -d "./site-build" ]; then
134+
echo "❌ Site build directory not found"
135+
exit 1
136+
fi
137+
echo "✅ Found $(find ./site-build -type f | wc -l) files in site-build"
138+
ls -la ./site-build/ | head -10
139+
123140
- name: Upload to GitHub Pages
124141
id: deployment
125142
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)