Add a --no-history optin to avoid growing branch weight
See original GitHub issueHi there,
First of all, thanks for you tool. It’s really useful and easy to use.
As a new feature, I would suggest to add a --no-history
option.
Deploying regularly to the branch gh-pages
make its the git history growing again and again. But this branch (or any branch used to host static content) doesn’t really need to be versioned into the history.
There is a similar tool written in nodejs which has an option --no-history
to overwrite the previous commit: gh-pages. It’s reported that it works well, as it in a GH Action.
- name: deploy to gh pages
run: |
echo "Deploying to directory: ${{env.BRANCH_NAME}}"
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
npx gh-pages --dist dist/ --dest ${{env.BRANCH_NAME}} --remove "${{env.BRANCH_NAME}}/**" --no-history --repo "https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git"
NPM option: https://www.npmjs.com/package/gh-pages#optionshistory
Original issue: https://github.com/geotribu/website/issues/302 by @fgravin
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Git submodule without extra weight - Stack Overflow
When I add shallow submodule with master-src branch I do get only the files that are part of master-src branch, however, also sparce...
Read more >Intraductal Papillary Mucinous Neoplasm of Pancreas - NCBI
IPMN is a pancreatic exocrine tumor composed of intraductal papillary growth of mucin containing neoplastic cells in the MPD or its major branches....
Read more >PeopleSoft 9.2: Staffing Front Office - Oracle Help Center
Define branch information and business unit mapping. Related Links. "Installation Options - Staffing Installation Page (PeopleSoft FSCM 9.2: Application ...
Read more >WHO guidelines on drawing blood best practices in phlebotomy
One important measure to prevent infection is to recruit donors from populations that are known to have low rates of infection for bloodborne...
Read more >Association Between Maternal Caffeine Consumption and ...
Increasing caffeine measures were significantly associated with lower birth weight, shorter length, and smaller head, arm, and thigh ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for confirming. The functionality has been released in version 1.1.0.
You’re right, here comes more information to track on this.
Sys info
Repository used to test
Repo main page: https://github.com/Guts/DicoGIS gh-pages branch: https://github.com/Guts/DicoGIS/tree/gh-pages
Published doc: https://guts.github.io/DicoGIS/ with page about doc process https://guts.github.io/DicoGIS/development/documentation.html
Github Action: https://github.com/Guts/DicoGIS/blob/master/.github/workflows/docs_builder.yml
Conclusion
It was just about options order and positional arg:
ghp-import --force --no-jekyll --push docs/_build/html --no-history
ghp-import --force --no-jekyll --push --no-history docs/_build/html
😉