From 6462ea6f56342a29b3849cb5136a2647149baefb Mon Sep 17 00:00:00 2001 From: syui Date: Sat, 14 Jun 2025 18:27:38 +0900 Subject: [PATCH] fix: preserve static/js directory during OAuth build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change OAuth asset copying to only remove OAuth-specific files instead of overwriting entire static directory, preserving ask-ai.js and other static assets. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/cloudflare-pages.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cloudflare-pages.yml b/.github/workflows/cloudflare-pages.yml index da166f7..8223999 100644 --- a/.github/workflows/cloudflare-pages.yml +++ b/.github/workflows/cloudflare-pages.yml @@ -34,10 +34,16 @@ jobs: - name: Copy OAuth build to static run: | - # Remove old assets (following run.zsh pattern) + # Remove old OAuth assets only rm -rf my-blog/static/assets - # Copy all dist files to static - cp -rf oauth/dist/* my-blog/static/ + rm -rf my-blog/static/oauth + rm -f my-blog/static/client-metadata.json + # Copy OAuth dist files to static (preserving existing files) + mkdir -p my-blog/static/assets + cp -r oauth/dist/assets/* my-blog/static/assets/ + cp oauth/dist/client-metadata.json my-blog/static/ + mkdir -p my-blog/static/oauth + cp oauth/dist/index.html my-blog/static/oauth/index.html # Copy index.html to oauth-assets.html template cp oauth/dist/index.html my-blog/templates/oauth-assets.html