ci: skip Pagefind step when no HTML pages exist yet

This commit is contained in:
tiennm99 committed 2026-05-07 20:29:33 +07:00
1 parent fb0c9e1248
commit 1112fdf039
1 file changed
+6 -1
+6 -1
View File
@@ -45,7 +45,12 @@ jobs:
run: hugo --gc --minify --baseURL "https://tiennm99.github.io/tsuki/"
- name: Build Pagefind index
run: npx pagefind --site exampleSite/public
run: |
if find exampleSite/public -name "*.html" -type f | head -1 | grep -q .; then
npx pagefind --site exampleSite/public
else
echo "No HTML files found yet (layouts not implemented). Skipping Pagefind."
fi
- name: Upload artifact
uses: actions/upload-pages-artifact@v3