From f435bf26996a6b66d14ce972b12e2fd4a27eed9b Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Mon, 29 Jun 2026 14:56:22 -0600 Subject: [PATCH] fix(docs-preview): cp _site to runner-owned dir before sed jekyll-build-pages creates files owned by root; chmod and sed -i both fail. Copying to a new directory transfers ownership to the runner, making in-place sed edits work. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/docs-preview.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index 213e72d..88ea665 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -36,12 +36,14 @@ jobs: - name: Point preview at staging-coder.ddev.com if: github.event.action != 'closed' - run: find ./_site -name "*.html" -exec sed -i 's|https://coder\.ddev\.com|https://staging-coder.ddev.com|g' {} + + run: | + cp -r ./_site ./_site_preview + find ./_site_preview -name "*.html" -exec sed -i 's|https://coder\.ddev\.com|https://staging-coder.ddev.com|g' {} + - name: Deploy PR preview uses: rossjrw/pr-preview-action@v1 with: - source-dir: ./_site + source-dir: ./_site_preview preview-branch: gh-pages umbrella-dir: pr-preview token: ${{ secrets.GITHUB_TOKEN }}