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

[CI] Reduce repo size by auto-trimming gh-pages branch #11653

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

marcdumais-work
Copy link
Contributor

@marcdumais-work marcdumais-work commented Sep 8, 2022

What it does

Use "force_orphan" option of GH action peaceiris/actions-gh-pages@v3

With this change, the API documentation that we generate as part of our CI will overwrite the gh-pages branch, only keeping the latest generated documentation. This will reduce the repository size (when cloned, from close to 3GB to ~150M.

As a consequence, we will lose the history of API documentation. It will still be possible to manually generate it locally (yarn docs).

Fixes #11625

How to test

I pushed the change on my fork of this repo. See resulting gh-pages branch: https://github.com/marcdumais-work/theia/tree/gh-pages.

You can also try cloning my fork, and confirm that about 150M is transferred, instead of ~2.8G:
$ git clone git@github.com:marcdumais-work/theia.git

update: it took a little while, but my repo size, as reported by GitHub, has shrunk to the expected, much smaller size, without further action on my part:
image

Generated doc (my fork): https://marcdumais-work.github.io/theia/docs/next/index.html

Review checklist

Reminder for reviewers

…s@v3

With this change, the API documentation that we generate as part of our CI
will overwrite the `gh-pages` branch, only keeping the latest generated
documentation. This will reduce the repository size (when cloned, from
close to 3GB to ~150M.

As a consequence, we will lose the history of API documentation. It will
still be possible to manually generate it locally (yarn docs).

Fixes #11625

Signed-off-by: Marc Dumais <marc.dumais@ericsson.com>
@marcdumais-work marcdumais-work added git issues related to git ci issues related to CI / tests contributor experience issues related to the contributor experience labels Sep 8, 2022
@marcdumais-work
Copy link
Contributor Author

I aded an entry to discuss this in the next dev-meeting

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

LGTM 👍

We are only interested in providing documentation for the latest state at the moment, and it is is always possible to re-generate the documentation for any given commit.

The force_orphan option is correct according to the documentation:

We can set the force_orphan: true option. This allows you to make your publish branch with only the latest commit.

I also confirmed that your fork has a much smaller gh-pages size.

@marcdumais-work
Copy link
Contributor Author

Thanks @vince-fugnitto

@marcdumais-work marcdumais-work merged commit c068f79 into master Sep 13, 2022
@github-actions github-actions bot added this to the 1.30.0 milestone Sep 13, 2022
@marcdumais-work marcdumais-work deleted the gh-11625 branch September 13, 2022 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci issues related to CI / tests contributor experience issues related to the contributor experience git issues related to git
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repo size getting out-of-hand (nearly 3GB and growing)
2 participants