edgecase/middleman-gh-pages

Pushing build dir to master branch

johnrees opened this issue · 8 comments

For user pages you shouldn't use a gh-pages branch, instead -

Content from the master branch will be used to build and publish the Pages

https://help.github.com/articles/user-organization-and-project-pages

Good point. Where would the source files live in this case? I'm assuming you'd need another branch so that source and build files are separate.

Source files would be everything in the root directory excluding the /build subdirectory, which is a default in the .gitignore

# Ignore bundler config
/.bundle

# Ignore the build directory
/build

# Ignore Sass' cache
/.sass-cache

I propose pushing the contents of /build to master and the root/parent directory to a branch called source (or a branch name that won't cause confusion with the /source subdirectory)

Works for me. Since you're always running the rake tasks from the source, the task could detect whether you are in a "master" or "source" branch, with no configuration needed:

  • if run from branch "master", deploy to "gh-pages"
  • if run from branch "source", deploy to "master"

Thoughts?

I would agree on that, I do this almost exact thing. My source work is on a dev branch and then my rake task on that branch pushes the build to the master branch. You can check out the repo if you like. It's kind of a hack but I definitely think that we can build that into this gem.

I forked the project, and I'll work on a solution for this. I have a feeling my project is half of the battle.

Yes. We should probably fail with a helpful message if there is no git
repo, but without an existing git repo, the gem really can't do anything.

On Tue, Jun 18, 2013 at 3:59 PM, Mark Tareshawty
notifications@github.comwrote:

@adamlogic https://github.com/adamlogic are we then assuming that this
is already at git repo?

Otherwise I'm not entirely sure how we could distinguish between a
gh-pages project and a GitHub user pages project.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-19637699
.

Adam McCrea

Neo | Neo.com http://neo.com/

Github/Twitter/Skype: adamlogic
Phone: 614.302.1744
*

I'm sorry if I'm missing something, but is there a final solution to this now?

Was #10 ever accepted as a fix for this issue? The branch now conflicting with master.

Implementation aside, +1 for being able to build to master for user and organization pages.

rmm5t commented

Closed by #28.