Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old GitHub Pages commits to reduce repo size #3321

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

ollietreend
Copy link
Contributor

This repository uses GitHub Actions to automatically build and publish the docs to GitHub Pages.

Deploying to GitHub Pages involves pushing a commit of the built site to the gh-pages branch. We use the third-party GitHub Action peaceiris/actions-gh-pages@v3 to handle this for us.

This commit sets the config option force_orphan: true on peaceiris/actions-gh-pages@v3, which will cause new commits to gh-pages to be orphaned.

Old build commits will therefore no longer belong to the gh-pages branch. This should result in future fetches and clones of the repo ignoring or garbage collecting those dangling commits.

Currently the gh-pages branch sits at around ~10k builds, so this change should enable a fairly significant size reduction for the repo.

This repository uses GitHub Actions to automatically build and publish the docs to GitHub Pages.

Deploying to GitHub Pages involves pushing a commit of the built site to the `gh-pages` branch. We use the third-party GitHub Action `peaceiris/actions-gh-pages@v3` to handle this for us.

This commit sets the config option `force_orphan: true` on `peaceiris/actions-gh-pages@v3`, which will cause new commits to `gh-pages` to be orphaned.

Old build commits will therefore no longer belong to the `gh-pages` branch. This should result in future fetches and clones of the repo ignoring or garbage collecting those dangling commits.

Currently the `gh-pages` branch sits at around ~10k builds, so this change should enable a fairly significant size reduction for the repo.
Copy link
Contributor

@ChrisBAshton ChrisBAshton left a comment

Choose a reason for hiding this comment

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

Great work and initiative taking. Thank you! ⭐

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.

None yet

2 participants