Skip to content

PR previews are wiped on each production docs deploy #702

Closed

Description

@adamkudrna

Problem

PR preview deployments (under pr-preview/) on the gh-pages branch are wiped out every time a production documentation release runs.

The root cause is that the production deploy uses mkdocs gh-deploy, which delegates to ghp-import under the hood. ghp-import offers no option to exclude a directory from being overwritten — it replaces the entire branch content on each deploy.

This was identified as a follow-up to #701.

Possible solution

Switch the production deploy step in release-management.yml from mkdocs gh-deploy to JamesIves/github-pages-deploy-action@v4 with the following options:

  • clean-exclude: pr-preview — preserves the pr-preview/ directory across deploys
  • force: false — avoids force-pushing, which is compatible with how pr-preview-action manages the branch

See also: https://github.com/rossjrw/pr-preview-action?tab=readme-ov-file#ensure-your-main-deployment-is-compatible

Activity

  1. moved this from 💡Ideas to 🔖 To do in The Boardon Mar 21, 2026
  2. added
    bugSomething isn't working
    documentationImprovements or additions to documentation
    and removed
    documentationImprovements or additions to documentation
    on Mar 21, 2026
  3. adamkudrna commented on Aug 26, 2026

    @adamkudrna
    MemberAuthor

    Fixed by #722 (9bbaf15d), merged 2026-07-31.

  4. moved this from 🔖 To do to ✅ Done in The Boardon Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status
      ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions