From 1112fdf0398034d30610fdffd7a8817afd4707af Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Thu, 7 May 2026 20:29:33 +0700 Subject: [PATCH] ci: skip Pagefind step when no HTML pages exist yet --- themes/tsuki/.github/workflows/pages.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/themes/tsuki/.github/workflows/pages.yml b/themes/tsuki/.github/workflows/pages.yml index 6876e8b..adfe02e 100644 --- a/themes/tsuki/.github/workflows/pages.yml +++ b/themes/tsuki/.github/workflows/pages.yml @@ -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