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

Automate gh-pages branch createon #201

Closed
gsvgit opened this issue Aug 5, 2015 · 10 comments
Closed

Automate gh-pages branch createon #201

gsvgit opened this issue Aug 5, 2015 · 10 comments

Comments

@gsvgit
Copy link
Member

gsvgit commented Aug 5, 2015

It would be useful to automate gh-pages branch creation in init script.
Note that Scaffold can be used for projects with long history, so

  • gh-pages may exist and contain important data. But in this case it can contain some files (e.g paket.template) which could break package creation process (look at issue Internal knowledge about release steps required. #199). So, existing branch should be checked and cleaned if possible.
  • gh-pages may not exists, but it can not be created by simple branching (look at the previous point). What is the right way:
    • branch from initial commit
    • branch from current state and cleanup ?
@klettier
Copy link
Contributor

  • Option 1

Create an orphan branch with git

git checkout --orphan gh-pages
git rm -rf .
git commit -m 'Initial commit'
  • Option 2

Create gh-pages branch from GitHub
Settings -> options -> GitHub Pages -> Lauch automatic page generator

@gsvgit
Copy link
Member Author

gsvgit commented Aug 11, 2016

@klettier Thanks, but seems it is for manual creation (especially second option). What about automation?

@klettier
Copy link
Contributor

It could be easy to apply first option in build script if the branch doesn't exist.
I'm not a fan of implicit stuff like creation of the branch without asking the end user, what are your thoughts?

klettier

@gsvgit
Copy link
Member Author

gsvgit commented Aug 11, 2016

I think you are right that implicit branch creation is not good idea but scaffold initial script is interactive. So, user can choose necessary options (like repo initialisation in current version).

@klettier
Copy link
Contributor

For me when we init the repo (wantGit = true) we should init this branch too (implicit way).
If we are working on a legacy repo we can propose

  • Branch creation on init (Check state first)
  • Maybe a specific target ?

@gsvgit
Copy link
Member Author

gsvgit commented Aug 12, 2016

Sounds great.
Seems that on a legacy repo we should use explicit way. Thus separated step "Init gh-pages branch? [Y|n]" should be in scaffold initialization script (with state checking of course).

@jackfoxy
Copy link
Collaborator

jackfoxy commented Nov 5, 2016

Github pages now supports the master branch docs folder as source https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/
This would be a somewhat breaking change, but I'm not sure it matters. (Who ever merges ProjectScaffold changes once they have cloned it?)

Much simpler for people to implement and understand.

@forki
Copy link
Member

forki commented Nov 5, 2016

Cool we could use that for new projects. Usually people don't merge projectscaffold back to existing projects

@jackfoxy
Copy link
Collaborator

jackfoxy commented Jan 20, 2017

I have a PR related to implement the new model of publising docs. #278 If there is interest in carrying this forward, I can resolve the merge conflict. This is implemented as a hard cut-over to the simpler model of publishing docs on Github. In other words the gh-pages option would not be available. // @pblasucci

@jackfoxy
Copy link
Collaborator

Closing this in favor of keeping discussion open in this issue #304

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

No branches or pull requests

4 participants