Closed muradkhateeb78 closed 7 months ago
Any comments, anybody?
Hi @muradkhateeb78, thanks for describing your situation in such an organized way and with so much detail.
or if there exists any other configuration/operational parameters that we can use to achieve this?
The gh-pages
part of the deploy
script defined in package.json
is referring to a CLI utility provided as part of the gh-pages
NPM package.
You can run the gh-pages
command manually (i.e. not via npm run
) and append the --help
option to see the configuration options available. Then, assuming you find one that does what you want, you can edit the deploy
script in package.json
accordingly.
Docs: https://github.com/tschaub/gh-pages#command-line-utility
Hi @muradkhateeb78, did that answer your question? Are you still having issues?
No reply in 5 months. Closing.
Context
I have a react app which I have deployed to GitHub Pages, its actually the documentation of my project. I have a different repository which has the source code of my main project and whenever a change is made in my main branch, it triggers the documentation build which updates the "gh-pages" and ultimately the project documentation.
Problem Statement
We work in a team and push frequent changes to main branch and it triggers the documentation action every time. Which is good but it also maintains all the history of the commits which makes the documentation app branch heavier and difficult to maintain. We do not want to keep all the commits, just the latest one should suffice. While pushing to the "gh-pages" we want to delete all the commits except the latest one.
Our Analysis We could run git commands to get rid of the existing commits but we want to know how we can customize "npm run deploy" command to do this or if there exists any other configuration/operational parameters that we can use to achieve this?