cleaver icon indicating copy to clipboard operation
cleaver copied to clipboard

deploy to github pages

Open guaka opened this issue 9 years ago • 12 comments

Would be nice if cleaver presentations could be easily deployed to GitHub pages. A bit like generator-bespoke does with gulp deploy.

guaka avatar Mar 10 '15 19:03 guaka

Great idea - been playing around with the idea for a long time but was never sure how others did it. Thanks for the example!

jdan avatar Mar 10 '15 19:03 jdan

I was thinking about creating jekyll-plugin that would convert any *.cleaver.md files into html files, so you could use that with github-pages.

sudodoki avatar Mar 10 '15 20:03 sudodoki

One issue I ran in - need to do the actual work - for this will need to reimplement the transform step in ruby, probably.

sudodoki avatar Mar 10 '15 20:03 sudodoki

I got this to work for my simple case like this:

  • Write my entire presentation in a single slides.md file. Set the output file option to index.html.
  • Build html with cleaver slides.md.
  • Commit and push to github -- first to master, then to a branch called gh-pages. The branch name has to be gh-pages to be picked up by github!
  • After a few minutes the presentation should be live at username.github.io/repo-name.

For example, here's my presentation repo: https://github.com/danpaz/eb-talk. More info on github pages: https://pages.github.com/.

danpaz avatar Mar 26 '15 03:03 danpaz

Thanks for the detailed steps @danpaz. My only concern is that I'd like gh-pages to not have any .md or anything, just the output. I'm not 100% sure how to generate the file, move it somewhere temporarily, then move it back after making an (orphaned) gh-pages branch.

Maybe there's a node module to access /tmp on any OS. I'll have to look into it.

If anyone has any insights on this let me know!

jdan avatar Apr 09 '15 21:04 jdan

I use the same method as @danpaz documents. (https://github.com/mike-ward/talk-nancyfx). I don't even bother pushing to master. I just edit and push everything to gh-pages. Works nicely.

mike-ward avatar Apr 10 '15 13:04 mike-ward

@mike-ward ha, good point - I guess there's no real need to switch branches.

jdan avatar Apr 10 '15 18:04 jdan

@jdan What do you think about adding a section to the README with the steps above? I'm happy to make a PR for that if you think it makes sense, and maybe later we can revisit deploying from the cli with one command.

danpaz avatar Apr 12 '15 00:04 danpaz

I don't think it's too useful for the README - we should just automate it if possible.

jdan avatar Apr 12 '15 02:04 jdan

Maybe the best solution to this would be to add steps on the README describing how to achieve it.

In general, it's pretty simple. output: index.html and push to gh-pages.

I generally delete the master branch and always use gh-pages for presentation repos.

drawveloper avatar Jan 31 '16 17:01 drawveloper

gh-pages or buildbranch are useful and easy to use locally

iamstarkov avatar Nov 30 '16 15:11 iamstarkov

automation in CI needs some extra work and attention though, but pretty easy after you done it once

iamstarkov avatar Nov 30 '16 15:11 iamstarkov