You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Include gh-import source in MkDocs to solve windows path issues. #547
@collizo4sky has a point. There are absolutely no instructions anywhere for how to use ghp-deploy. For example, he could be missing any of the following (which I agree all seem obvious because I know how it works--but to a newcomer, maybe not so much):
Clone the relevant repo from Github
Checkout the branch which holds the unrendered docs (not the gh-pages branch).
Make sure the docs render properly (using mkdocs build and/or mkdocs serve). If not, fix, commit, and push your changes (not to the gh-pages branch).
From within the working tree of your repo (not the gh-pages branch), run mkdocs ghp-deploy.
That's it. The deploy command will build the docs, commit them to the gh-pages branch, and push the gh-pages branch to Github for you all in one step. It is important to note that "You should never edit files in your gh-pages branch by hand if you're using this script because you will lose your work."
That last sentence was taken directly from the docs for the ghp-import tool, which mkdocs uses under the hood. And while ghp-import does not push by default, mkdocs ghp-deploy does (and in fact the default behavior cannot be overridden--which may or may not be a good idea).
I totally was doing this wrong.What I did was,* checkout the gh-branch* copy the content of the site folder to the local branch* run gh-deployThank you for taking time to explain.I will give it a try and get back to you. From: Waylan LimbergSent: Sunday, 24 May 2015 3:44 AMTo: mkdocs/mkdocsReply To: mkdocs/mkdocsCc: Agbonghama CollinsSubject: Re: [mkdocs] Is there a guide to using gh-deploy ? can't get it to work (#547)@collizo4sky has a point. There are absolutely no instructions anywhere for how to use ghp-deploy. For example, he could be missing any of the following (which I agree all seem obvious because I know how it works--but to a newcomer, maybe not so much):
Clone the relevant repo from Github
Checkout the branch which holds the unrendered docs (not the gh-pages branch).
Make sure the docs render properly (using mkdocs build and/or mkdocs serve). If not, fix, commit, and push your changes (not to the gh-pages branch).
From within the working tree of your repo (not the gh-pages branch), run mkdocs ghp-deploy.
That's it. The deploy command will build the docs, commit them to the gh-pages branch, and push the gh-pages branch to Github for you all in one set. It is important to note that "You should never edit files in your gh-pages branch by hand if you're using this script because you will lose your work."
That last sentence was taken directly from the docs for the ghp-import tool, which mkdocs uses under the hood. And while ghp-import does not push by default, mkdocs ghp-deploy does (and in fact the default behavior cannot be overridden--which may or may not be a good idea).
—Reply to this email directly or view it on GitHub.
The gh-branch of that repo is the branch for the Github page.
Each time i run the mkdocs gh-deploy command, i get this
$ mkdocs gh-deploy
Building documentation to directory: site
Directory site contains stale files. Use --clean to remove
Copying 'site' to `gh-pages` branch and pushing to GitHub.
changed the title [-]Is there a guide to using gh-deploy ? can't get it to work[/-][+]Include gh-import source in MkDocs to solve windows path issues.[/+]on May 30, 2015
$ mkdocs gh-deploy --clean
INFO - Cleaning site directory
INFO - Building documentation to directory: c:\Users\collizo4sky\Desktop\Cod
e\Code\pp-doc\site
INFO - Copying 'c:\Users\collizo4sky\Desktop\Code\Code\pp-doc\site' to 'gh-p
ages' branch and pushing to GitHub.
Traceback (most recent call last):
File "c:\Python34\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "c:\Python34\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\Python34\Scripts\mkdocs.exe\__main__.py", line 9, in <module>
File "c:\Python34\lib\site-packages\click\core.py", line 664, in __call__
return self.main(*args, **kwargs)
File "c:\Python34\lib\site-packages\click\core.py", line 644, in main
rv = self.invoke(ctx)
File "c:\Python34\lib\site-packages\click\core.py", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\Python34\lib\site-packages\click\core.py", line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\Python34\lib\site-packages\click\core.py", line 464, in invoke
return callback(*args, **kwargs)
File "c:\Python34\lib\site-packages\mkdocs\cli.py", line 186, in gh_deploy_com
mand
gh_deploy.gh_deploy(config, message=message)
File "c:\Python34\lib\site-packages\mkdocs\gh_deploy.py", line 69, in gh_deplo
y
remote_branch)
File "c:\Python34\lib\site-packages\mkdocs\utils\ghp_import.py", line 163, in
ghp_import
if not try_rebase(remote, branch):
File "c:\Python34\lib\site-packages\mkdocs\utils\ghp_import.py", line 78, in t
ry_rebase
if sp.call(cmd) != 0:
File "c:\Python34\lib\subprocess.py", line 537, in call
with Popen(*popenargs, **kwargs) as p:
File "c:\Python34\lib\subprocess.py", line 859, in __init__
restore_signals, start_new_session)
File "c:\Python34\lib\subprocess.py", line 1086, in _execute_child
args = list2cmdline(args)
File "c:\Python34\lib\subprocess.py", line 663, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: 'str' does not support the buffer interface
Activity
d0ugal commentedon May 23, 2015
Not really, there is very little to it. What happens when you run
mkdocs gh-deploy?w3guy commentedon May 23, 2015
It shows deploy successful but doesn't show up in GitHub
On Sat, May 23, 2015 at 2:14 PM, Dougal Matthews [email protected]
wrote:
d0ugal commentedon May 23, 2015
What URL does the go and display? What repo is it? Send over as many details as you can.
waylan commentedon May 24, 2015
@collizo4sky has a point. There are absolutely no instructions anywhere for how to use ghp-deploy. For example, he could be missing any of the following (which I agree all seem obvious because I know how it works--but to a newcomer, maybe not so much):
mkdocs buildand/ormkdocs serve). If not, fix, commit, and push your changes (not to the gh-pages branch).mkdocs ghp-deploy.That's it. The deploy command will build the docs, commit them to the gh-pages branch, and push the gh-pages branch to Github for you all in one step. It is important to note that "You should never edit files in your gh-pages branch by hand if you're using this script because you will lose your work."
That last sentence was taken directly from the docs for the ghp-import tool, which mkdocs uses under the hood. And while ghp-import does not push by default, mkdocs ghp-deploy does (and in fact the default behavior cannot be overridden--which may or may not be a good idea).
w3guy commentedon May 24, 2015
I totally was doing this wrong.What I did was,* checkout the gh-branch* copy the content of the site folder to the local branch* run gh-deployThank you for taking time to explain.I will give it a try and get back to you. From: Waylan LimbergSent: Sunday, 24 May 2015 3:44 AMTo: mkdocs/mkdocsReply To: mkdocs/mkdocsCc: Agbonghama CollinsSubject: Re: [mkdocs] Is there a guide to using gh-deploy ? can't get it to work (#547)@collizo4sky has a point. There are absolutely no instructions anywhere for how to use ghp-deploy. For example, he could be missing any of the following (which I agree all seem obvious because I know how it works--but to a newcomer, maybe not so much):
Clone the relevant repo from Github
Checkout the branch which holds the unrendered docs (not the gh-pages branch).
Make sure the docs render properly (using mkdocs build and/or mkdocs serve). If not, fix, commit, and push your changes (not to the gh-pages branch).
From within the working tree of your repo (not the gh-pages branch), run mkdocs ghp-deploy.
That's it. The deploy command will build the docs, commit them to the gh-pages branch, and push the gh-pages branch to Github for you all in one set. It is important to note that "You should never edit files in your gh-pages branch by hand if you're using this script because you will lose your work."
That last sentence was taken directly from the docs for the ghp-import tool, which mkdocs uses under the hood. And while ghp-import does not push by default, mkdocs ghp-deploy does (and in fact the default behavior cannot be overridden--which may or may not be a good idea).
—Reply to this email directly or view it on GitHub.
d0ugal commentedon May 24, 2015
Sure, so we need to cover this workflow in detail when we do #477.
w3guy commentedon May 26, 2015
Hi, i still can't get it to work.
BreakDown
The master branch of https://github.com/ProfilePress/documentation/ stores the mkdocs files with all the markdown files in
docfolderThe gh-branch of that repo is the branch for the Github page.
Each time i run the
mkdocs gh-deploycommand, i get thisBut the gh-branch is being updated @waylan
d0ugal commentedon May 26, 2015
@collizo4sky How are your git remotes configured? You can see this with
git remote -vd0ugal commentedon May 26, 2015
Oh, horrible. You must be hitting this I guess: https://github.com/mkdocs/mkdocs/blob/0.12.2/mkdocs/gh_deploy.py#L19
Add logging output so we know what the error is
w3guy commentedon May 26, 2015
This was what i got after running
git remote -vAny idea?
d0ugal commentedon May 26, 2015
Aha! It's
httpsI wonder if that could be a problem, I'd expect to see SSH. Can you push the branch manually okay?If it asks for a username and password, I bet it wont work with MkDocs.
d0ugal commentedon May 26, 2015
There is a bit more info about this here: https://help.github.com/articles/which-remote-url-should-i-use/
w3guy commentedon May 26, 2015
It didnt ask for a username or password cos i already have lookup the credentials from
.git-credentialfile.It says everything s up to date when i ran the command.
34 remaining items
[-]Is there a guide to using gh-deploy ? can't get it to work[/-][+]Include gh-import source in MkDocs to solve windows path issues.[/+]Refactor gh-deploy and remove ghp-import requirement
Refactor gh-deploy and remove ghp-import requirement
d0ugal commentedon Jun 12, 2015
@collizo4sky with
0.14.0released, can you confirm this all works now?w3guy commentedon Aug 1, 2015
I will do a test now and get back to you.
w3guy commentedon Aug 1, 2015
Hi @d0ugal, still not working.