pyo3 icon indicating copy to clipboard operation
pyo3 copied to clipboard

Reduce `gh-pages` branch size?

Open messense opened this issue 3 years ago • 6 comments
trafficstars

It gets annoying git pull receives several hundred megabytes due to gh-pages branch updates.

❯ git pull
remote: Enumerating objects: 23466, done.
remote: Counting objects: 100% (23466/23466), done.
remote: Compressing objects: 100% (2336/2336), done.
remote: Total 23466 (delta 21105), reused 23257 (delta 20905), pack-reused 0
Receiving objects: 100% (23466/23466), 214.82 MiB | 5.80 MiB/s, done.
Resolving deltas: 100% (21105/21105), completed with 2622 local objects.
From github.com:PyO3/pyo3
   53b83cccbf..ef308ffaad  main       -> upstream/main
   74f4ccd485..2d9e575e3d  gh-pages   -> upstream/gh-pages
Updating 53b83cccbf..ef308ffaad

How about only keep the latest commit in gh-pages branch?

https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-force-orphan-force_orphan

messense avatar Jun 23 '22 06:06 messense

Yes please! I was already wondering why the repo is so big.

Alternately, the gh-pages can be put into a separate repo.

birkenfeld avatar Jun 23 '22 06:06 birkenfeld

Yeah this had been bothering me too but I didn't have time to look into it 🙂

force_orphan seems like a good quick fix, yes please! I also wonder if we should consider moving to netlify or something similar?

davidhewitt avatar Jun 23 '22 07:06 davidhewitt

https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-keeping-existing-files-keep_files

With the v3, this option does not support working with the force_orphan option. The next major release (version 4) will support this

Oops, keep_files does not work with force_orphan.

messense avatar Jun 23 '22 07:06 messense

Moving to Netlify will require a DNS change, but we can try it out first with Netlify subdomain.

messense avatar Jun 23 '22 08:06 messense

Oops, keep_files does not work with force_orphan.

The redirect step might not need force_orphan though?

birkenfeld avatar Jun 23 '22 08:06 birkenfeld

Just force-pushed to trim the branch.

davidhewitt avatar Jul 23 '22 19:07 davidhewitt

Looks like https://pyo3.rs/main/ somehow does not include #2499 , not sure what's going on, build the guide locally does include it.

If we going to use netlify, we can apply for a open source plan first and create a team on netlify.

messense avatar Aug 13 '22 01:08 messense

Looks like we have to first create the netlify pages and then apply, to demonstrate we meet their open source plan requirements. I'm happy to give configuring netlify a shot later.

davidhewitt avatar Aug 16 '22 07:08 davidhewitt

I've squashed the gh-pages branch one last time, removing all the stuff other than the versioned guide builds.

The branch pre-squash can be found in my fork at https://github.com/davidhewitt/pyo3/tree/gh-pages-20220828, should we ever need it.

davidhewitt avatar Aug 28 '22 07:08 davidhewitt