Add --upload for generated HTML in GitHub repositories - #1
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pageleaf can now publish its generated HTML to an existing GitHub repository with
--upload [owner/]repo. For example,pageleaf ./docs --upload pagescommitsdocs.htmlto the root of the signed-in user'spagesrepository on its default branch, replacing an existing file. An explicit owner such as--upload my-org/pagesselects that account or organization.The upload uses
ghfor GitHub identity and repository access, and Git with a temporary bare repository for the commit and normal push. It preserves unrelated files, supports empty repositories, skips identical content, and uses the signed-in user's GitHub noreply identity. Remote replacement is automatic;--forceretains its existing local-output meaning.Failures explain the next steps for missing tools, authentication, repository access, directory collisions, local I/O, network issues, and rejected pushes. The generated HTML remains available after a failed upload. Missing repositories are not created automatically, and GitHub Pages is not configured.
Validation:
asafmor/pagesusing both owner forms. Uploaded bytes matched the generated file and unrelated entries remained unchanged. The temporary HTML was removed with a follow-up Git commit, restoring the original root tree.