Smoother workflow when writing docs
See original GitHub issueAt the moment the documentation source lives in a separate branch, imaginatively called docs
.
So adding features with docs consists of these steps:
- Fork/pull master
- Code feature and tests
- Commit, push and create PR for feature
- Pull docs
- Write docs
- Commit, push and create PR for feature
While not especially difficult or bad, it does seem suboptimal. More importantly, perhaps, it signals a separation between docs and features, where (IMHO) the two should go together - it makes it much easier to discuss a feature if the docs are part of the PR for that feature.
I’m not an expert in Hugo, but from looking at the GH actions defines for deploying docs, it seems like the following should be feasible:
- Move documentation source away from the
docs
branch and into master, in a folder called … drumroll …docs
. - Move all Hugo configuration into that folder as well, in effect making the docs folder be a fully self-contained Hugo site.
- Change the documentation deploy job to be something like:
a. Copy files from the
docs
folder in master in to the working directory of a CI agent. b. Run Hugo build step against that folder c. Push the build output into the gh-pages branch (like it is done today)
Are there any obvious reasons that I’m missing for why the docs and code are kept separate, and/or something like the above is impossible?
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (21 by maintainers)
Top Results From Across the Web
Documenting Workflows: Benefits, Mistakes & How to ...
Write down the necessary steps or changes to be made in each situation to ensure a smooth workflow. 8. Document tools and resources....
Read more >The Ultimate Workflow for Writers Obsessed with Quality
A seven-step workflow for writing, to ensure quality every time (plus the essential tools and software you need to make it happen)
Read more >How to Create and Document a Workflow
Learn how to write an effective workflow for your business and download free, customizable workflow templates as Adobe PDF files.
Read more >From Chaos to Clarity: Streamlining Workflow Documentation
Adopting a strategic approach to workflow documentation can transform chaos into clarity and streamline your operations for maximum efficiency.
Read more >How to Create Document and Workflow for Business Process
Steps involved in workflow documentation · Plan content outline · Write content · Prepare illustrations / diagrams · Review content · Seek approval ......
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
@isaacabraham
IMO, yes. 😃
The way I see it, if you have a GitHub issue, and you submit a PR against it for code, you could either include docs in that PR, or submit a separate PR mentioning it. That doesn’t require a separate docs branch and a separate branch could actually complicate it. Plus, the docs “branch” isn’t an actual real branch off of the code, but is currently being treated like a separate mini repo, which IMO is not really in line with how git would intend those things to work.
I wouldn’t worry about a methodical dream of keeping the docs & code in sync. Although, when you tag a release on the master branch, in this new way of doing things, the docs would also be captured as part of that tag at that point in time, which is nice.
I think @hravnx’s suggested approach simplifies things and makes the docs visible in a folder rather than a branch that someone has to know exists. I’d suggest going to there and then re-evaluating if need be.
Found a historical mention of these options: https://github.com/CompositionalIT/farmer/issues/84#issuecomment-609498633
I think the docs were in a docs branch prior to my involvement, and we kept it that way for inertia’s sake.