Restructure documentation site publishing#583
Conversation
|
This is a very useful PR, as docs, in practice, are not currently generated in |
|
This PR should not be merged as-is anymore, due to new docs workflow in I'd accept a new PR targeting
|
Rebuild the documentation workflow around the current feature/experimental publishing model. Pull requests now validate both MkDocs and the optional site-novo landing page build, while master deploys to gh-pages instead of committing generated site output back to the protected source branch. Deploys preserve the gh-pages root when the landing source is absent, replace it with the site-novo build when present, always publish MkDocs under docs/, and keep .nojekyll plus CNAME intact for GitHub Pages. Remove obsolete MkDocs nav entries for generated dependency reports that no longer exist in the documentation source. Co-authored-by: Codex <codex@openai.com>
3acbe45 to
988757d
Compare
Remove the generated site output from the source branch and move MkDocs builds to an ignored .build/mkdocs directory. The documentation workflow now deploys that generated output to gh-pages/docs instead of keeping HTML artifacts in development branches. Ignore both .build/ and /site/ so local documentation builds cannot accidentally reintroduce generated pages. Keep gh-pages as the only branch that carries the published HTML, preserving the landing page root plus .nojekyll and CNAME during deploys. Co-authored-by: Codex <codex@openai.com>
|
@leopiccionia, I updated this PR to align it with the current In the commit 988757d, I retargeted the PR to In the commit 9370943, I also removed the generated documentation output from the source branch itself. MkDocs now builds into the ignored So the intended separation is now:
The documentation workflow is passing after these changes. I’ll remove the |
Summary
site/sync workflow with a MkDocs workflow that validates documentation builds on pull requestsgh-pagesbranch when documentation changes reachmastersite/tree from the main development branch and ignore local MkDocs build outputjeowp.orgGitHub Pages domain throughdocs/CNAMEContext
This addresses #518 by separating documentation source from the generated publishing artifact. The previous workflow committed the generated MkDocs output back into the main branch, which kept
site/synchronized but also mixed generated HTML with normal development history.The new flow keeps
docs/,mkdocs.yml, andrequirements-docs.txtas the source of truth. Pull requests validate that MkDocs still builds, while deployment writes the generated site togh-pages, which is already the configured GitHub Pages source for the repository.Implementation details
.github/workflows/docs-site.ymlnow has separatebuildanddeployjobs.buildjob runs on pull requests todevelopormaster, plus relevant pushes/manual runs.deployjob only runs when the ref ismaster, including manual dispatches frommaster, and publishes withmkdocs gh-deploy --force --clean --remote-branch gh-pages.site/is removed from version control and added to.gitignoreas a local build output.docs/CNAMEensures a cleangh-pagesdeploy keeps thejeowp.orgcustom domain.site_urlnow matches the configured GitHub Pages custom domain.Validation
python3 -m mkdocs build --clean --strictpython3 -m mkdocs gh-deploy --helpto confirm the workflow options are available.github/workflows/docs-site.ymlgit diff --cached --checkFollow-up
This PR intentionally does not redesign or translate the documentation site. It only fixes the publishing architecture so future editorial and visual work can happen without generated HTML living in the main development branch.
Closes #518