Skip to content

Commit 17c7fdf

Browse files
darnjodarnjoclaude
authored
Fix Pagefind build: copy _site to writable directory (#175)
The jekyll-build-pages Docker action creates _site with root ownership, causing Pagefind to fail with permission denied. Copy to a writable directory, run Pagefind there, then replace the original. Co-authored-by: darnjo <josh@reso.org> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2386a23 commit 17c7fdf

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/pages.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ jobs:
8080
destination: ./_site
8181

8282
- name: Build search index with Pagefind
83-
run: npx pagefind --site ./_site
83+
run: |
84+
cp -r ./_site ./_site_writable
85+
npx pagefind --site ./_site_writable
86+
rm -rf ./_site
87+
mv ./_site_writable ./_site
8488
8589
- name: Upload artifact
8690
uses: actions/upload-pages-artifact@v3

0 commit comments

Comments
 (0)