Move away from orphaned commit as the default on branches hosting documentation
- Dominant language
- Python
- Stars
- 19
- Forks
- 7
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 50
Description
In the actions being used for deploying documentation to gh-pages (or any other branch for those who do that?), orphaned commit is the default option:

As this effectively means this is our recommendation, I haven't come across a project that deviates from using this default. Save to say all projects do this.
I understand that it helps keep things clean on the gh-pages branch, but isn't this a bit risky?
In cases where we are creating actions dealing with the creation/removal of the gh-pages contents, and for whatever reason during the prototyping stage the orphaned commit pushed is "messed-up", how do we easily revert to the previous state? It means if things get broken, we will have to generate the documentation for all past releases of that project. Or hope someone has an up-to-date local checkout which we can easily push.
Can we for example, consider "keeping the last 5 commits" or something similar?
Contributor guide
Research direction
Inspect the actions used to deploy documentation to gh-pages and identify where the orphaned-commit default is defined. Compare the current behavior with the requested rollback or commit-retention approach, then define a documented, testable default and its recovery behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100