Our great sponsors
-
actions-gh-pages
GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.
-
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.
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.
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.
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.
There's an ongoing beta to make GitHub pages deployments from actions without pushing to a branch: https://github.com/actions/deploy-pages