Skip to content

Commit 5fc3cd7

Browse files
authored
Squash deployed gh-pages, relying on this repo for history (#658)
In #621 and elsewhere, we are discussing the issue of autogenerating screenshots in the docs. @Czaki brought up the issue that git is very bad at handling binary blobs, so autogenerating images each time we build the docs would rapidly blow up the repo clone size. I think it's clear that we *do* want to autogenerate images, so the cleanest solution in my opinion is to always squash when pushing to our gh-pages site (napari.github.io). That history is not particularly valuable, and indeed we have squashed it once before when it was getting far too big to work with. Doing it automatically is actually an improvement. This PR achieves that by using the `force_orphan` option in the peaceiris/actions-gh-pages action to always squash the edit history before pushing to the gh-pages branch. ## References Zulip discussion: https://napari.zulipchat.com/#narrow/channel/298358-working-group-documentation/topic/Meeting.202025-03-13.2F14/near/505543160 `force_orphan` documentation: https://github.com/peaceiris/actions-gh-pages?tab=readme-ov-file#%EF%B8%8F-force-orphan-force_orphan
1 parent ca50453 commit 5fc3cd7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.github/workflows/build_and_deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,5 @@ jobs:
117117
publish_dir: ./html
118118
publish_branch: gh-pages
119119
destination_dir: ${{ github.event.inputs.target_directory || 'dev' }}
120+
force_orphan: true
120121
cname: napari.org

0 commit comments

Comments
 (0)