Skip to content

Publish docs from an isolated worktree - #255

Merged
hannesdejager merged 2 commits into
masterfrom
publish-site-safely
Oct 31, 2026
Merged

hannesdejager merged 2 commits into
masterfrom
publish-site-safely

Conversation

@hannesdejager

@hannesdejager hannesdejager commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

What changed

make site now calls the documented scripts/publish-site.sh. The script requires a clean, current master, builds the Doctave site, and publishes through an isolated temporary worktree based on the current netlify branch. It preserves the main checkout and untracked files, stops on fetch/build/commit/push errors, and skips a commit when generated content has not changed. The README explains how to use it.

This also includes the two Netlify deployment notes added to AGENTS.md.

Verification

  • doctave build --release completed successfully.
  • sh -n scripts/publish-site.sh and git diff --check passed.
  • A temporary repository test covered a successful publish, stale file removal, an unchanged publish, a rejected push, an existing site path, a non-master branch, tracked changes, and a stale master.

This PR changes the publishing command only; it does not push site content to netlify.

Build the site locally, then replace the contents of the Netlify branch
in a temporary worktree. This keeps the main checkout and its untracked
files intact and lets checkout or push failures stop publication.

Document the Netlify deployment branch in AGENTS.md.
Keep the Makefile target small and document how to deploy the generated
site. Require a clean, current master before publishing so the Netlify
branch reflects reviewed documentation. Preserve the isolated worktree
and failure handling from the original change.
@hannesdejager
hannesdejager merged commit 57a4c90 into master Oct 31, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant