Skip to content

chore(ci): Prevent file accumulation in cloudflare-pages branch#3491

Open
dishaprakash wants to merge 5 commits into
mainfrom
dishaprakash-patch-4
Open

chore(ci): Prevent file accumulation in cloudflare-pages branch#3491
dishaprakash wants to merge 5 commits into
mainfrom
dishaprakash-patch-4

Conversation

@dishaprakash

@dishaprakash dishaprakash commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Fixes the failing Cloudflare Pages CI deployment by preventing the infinite accumulation of old Pagefind search index chunks in the cloudflare-pages branch.

Previously, our deployment step used the actions-gh-pages action with keep_files: true. While this correctly protected older, stable versions of the docs (like v1.5.0), it also prevented Git from deleting stale files in the dev folder. Every time a PR was merged, Pagefind generated hundreds of newly hashed search chunks, which piled up next to the old ones. This caused the dev directory to quietly balloon to over 4,000 files, repeatedly breaking Cloudflare Pages' 20,000 file limit.

Key Changes:

  • Removed the generic actions-gh-pages deployment step.

  • Implemented a targeted Git deployment script that pulls the cloudflare-pages branch, explicitly wipes the old dev folder and copies over the fresh build.

  • Older, stable version directories remain completely untouched.

  • In the versioned release workflow, the older pagefind search indexes from previous deployments are pruned for the same effect

@dishaprakash dishaprakash requested a review from a team as a code owner June 22, 2026 11:47
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@dishaprakash dishaprakash changed the title chore(ci): Prevent file accumulation in dev docs deployment chore(ci): Prevent file accumulation in cloudflare-pages branch Jun 22, 2026
commit_message: "deploy: docs to root for ${{ steps.get_version.outputs.VERSION }}"
run: |
cd $GITHUB_WORKSPACE
git clone --branch cloudflare-pages https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git cf-pages-root-temp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the checkout action?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, also changed the bot to release please for CLA compliance

@dishaprakash dishaprakash requested a review from averikitsch July 1, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants