PSA: If you're using gh-pages to host your CI-generated documentation, make sure you don't store any history for that branch

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • rust

    Empowering everyone to build reliable and efficient software.

  • As it appears, Smithay is kinda hitting a few bad cases so that rustdoc output ends up pretty large: the target/doc/ folder we serve on github pages is ~220 MB in size. Keeping git history on such large content, generating huge diffs at each commit, really made the git repo blow up both in disk size and in processing time required to clone it.

  • actions-gh-pages

    GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.

  • As a first-step measure, we changed the CI script to overwrite the gh-pages branch at every run, rather than just appending a new commit. We use this gh-pages action, so it was just a matter of adding a force_orphan: true parameter.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • old-docs

    Discontinued Auto-generated doc mirror. Not interesting for humans.

  • Or do you mean that you have branch gh-pages in the same repository as the source code, which is then cloned by every user? It can make sense to move generated docs to a separate repo. Not only would that solve the problem you're describing, but you could also tweak other settings independently (deployed URL, permissions, etc.). Furthermore, your development repo's branches are not cluttered by CI-managed stuff. That's how I did it for godot-rust.

  • deploy-pages

    GitHub Action to publish artifacts to GitHub Pages for deployments

  • There's an ongoing beta to make GitHub pages deployments from actions without pushing to a branch: https://github.com/actions/deploy-pages

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts