question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Better support GithHub's user/org pages.

See original GitHub issue

In addition to supporting project pages (which use the gh-pages branch of the same repo: username/projectname), GitHub also supports user/organization pages which use a separate repo at username/username.github.io which then is published at https://username.github.io (rather than https://username.github.io/projectname). The problem arises from the fact that user/org pages use the master branch, which requires the repo which holds the built pages to be different than the repo that ghp-import needs to publish to.

Consider the following pseudo workflow:

cd project
build_docs --docs docs/ --out site

At this point, I am in the project repo, not the pages repo. If I do an ghp-import call, I will be pushing to the wrong repo. So I tried setting up an extra remote:

git remote add pages https://github.com/username/username.github.io.git

Then if I run:

ghp-import -r pages -b master site

It pushes the contents of the site dir to the master branch of the pages repo and my site gets published. However, in the process it also skunks my project repo by adding the same commit to the master branch of the local repo.

Perhaps if there was an option to specify a local branch to use, that would resolve the issue:

ghp-import -r pages -b master --local-branch foo site

Then the commit would be committed to the foo branch (or whatever I choose to call it), which would then get pushed to the master branch of the pages remote.

I realize that a workaround exists today, by changing to the pages branch and then calling ghp-import, but I’d rather not have to do this:

cd ../pages-repo
ghp-import -r origin -b master ../project/site

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
davispcommented, Dec 8, 2017

Don’t take that the wrong way. It may be possible with some config settings. My only point there was that if that is the sort of required setup I’d make it a README entry vs supporting it directly in code. I just haven’t had to ever investigate that particular aspect to know. If you do google around and find something let me know and we can figure out how best to approach it.

I’ll leave this ticket open for awhile incase someone else has something similar and/or knows the proper incantations for making that happen.

0reactions
c-wcommented, Jul 25, 2020

Resolving this issue as it’s been 3 years. Feel free to reopen if this is still a concern for you @waylan.

Read more comments on GitHub >

github_iconTop Results From Across the Web

About GitHub Pages
GitHub Pages is a static site hosting service that takes HTML, CSS, ... User and organization sites are connected to a specific account...
Read more >
Managing the publication of GitHub Pages sites for your ...
You can control whether organization members can publish GitHub Pages sites from repositories in the organization. Who can use this feature.
Read more >
Organizations - GitHub Docs
Use the REST API to control and manage all your GitHub organizations. Organizations · List organizations · Get an organization · Update an...
Read more >
About organizations - GitHub Docs
Your team can collaborate on GitHub by using an organization account, which serves as a container for your shared work and gives the...
Read more >
Customizing your organization's profile - GitHub Docs
You can customize your organization's Overview page to show a README and pinned repositories dedicated to public users or members of the organization....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found