Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish personal GitHub pages #354

Closed
jiahao opened this issue Feb 23, 2015 · 8 comments · Fixed by #417
Closed

Publish personal GitHub pages #354

jiahao opened this issue Feb 23, 2015 · 8 comments · Fixed by #417
Milestone

Comments

@jiahao
Copy link

jiahao commented Feb 23, 2015

I've switched over to using mkdocs for my personal page and am really liking the output.

I'd like to request that gh-deploy be extended to support personal GitHub pages also. Unlike project pages, personal pages must have repository names <username>.github.io, and the project is published to the master branch instead of gh-pages. Everything works fine if I do it manually so I presume supporting personal pages automatically should not be too difficult.

Edit: I have a hacky Makefile that emulates gh-deploy (assumes that the markdown source is on a branch called mkdocs and deploys to master):

site:
    git checkout mkdocs
    mkdocs build
    git checkout master
    cp -R site/* .
    rm -rf site
    echo Ready to commit and push
@d0ugal
Copy link
Member

d0ugal commented Mar 7, 2015

Seems reasonable. Currently our deploy code is really simple. How can we detect if it is a personal repo vs a project repo? By looking at the structure of the remote? I'd be happy to do this, but I don't want it to be a config option, so how can we figure it out automatically?

@d0ugal d0ugal added the Bug label Mar 7, 2015
@d0ugal d0ugal added this to the 0.12.0 milestone Mar 7, 2015
@jiahao
Copy link
Author

jiahao commented Mar 7, 2015

Thanks for looking into this request. As far as I understand, a GitHub user can only have one personal repo, and that repo must be named <username>.github.io. So whether a repo is personal or project should be quite straightforward to determine from the remote GitHub URL.

@peter1000
Copy link
Contributor

Publish personal GitHub pages: I would vote for such an option too.

@mickeyl
Copy link

mickeyl commented Mar 22, 2015

This would also support organization pages!

@d0ugal d0ugal added Enhancement and removed Bug labels Apr 2, 2015
@d0ugal
Copy link
Member

d0ugal commented Apr 3, 2015

Ok, by looking at my personal repo, I think this is how we need to do it.

Look at the output of git config --get remote.origin.url which has the format git@github.com:d0ugal/d0ugal.github.com.git

if it is USERNAME/USERNAME.github.com.git - then we can assume it is a personal/repo pages and push to master

@d0ugal
Copy link
Member

d0ugal commented Apr 3, 2015

Or, alternatively, we could just add the branch as an arguement to the gh-deploy command so you specify master. i.e. mkdocs gh-deploy --remote-branch master

@mickeyl
Copy link

mickeyl commented Apr 4, 2015

Agreed. The latter would provide more flexibility.

@d0ugal
Copy link
Member

d0ugal commented Apr 4, 2015

I also think the latter is also safer. I'm a bit scared about wiping the master branch on a repo by incorrectly guessing the URL. So lets have the user provide it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants