jnordberg / wintersmith

A flexible static site generator
http://wintersmith.io/
MIT License
3.5k stars 335 forks source link

Plugin for Deploying to Github pages or Heroku #151

Closed tusharmath closed 10 years ago

tusharmath commented 11 years ago

Do we have a plugin which can be used to deploy to GH pages or heroku from command line?

Something like this -

wintersmith publish

One can configure the settings using the Config.json file and then publish it to gh-pages etc. Right now I have a separate Grunt file which does this.

The best thing would be then to link this publish feature to Travis-CI so that your system doesn't have to do so much of load bearing.

PS: Maybe it's just me who is doing it all wrong, if that's true then can someone suggest a more simpler way of doing the same?

lvivier commented 11 years ago

Not sure if wintersmith should become a deploy tool, there are full on tools for that and wintersmith strives to be less opinionated about your workflow.

Right now I'm using wercker (like travis) to publish to gh-pages: http://luke.vivier.ca/wintersmith-with-wercker/ more trouble to setup, but my deploy command is just

git push
tusharmath commented 11 years ago

Im sorry to say that I don't really agree with you. When you look at a blogging framework you also look at how easy is it to deploy. Without deployment capabilities you don't quite complete the package. You could checkout octopress, wordpress and other established blogging frameworks - all of them suggest ways to host the website on Heroku, gh-pages etc.

Wintersmith should also have such features. Essentially just ask for the hosting service that you would prefer and then just with a simple command everything should get setup.

On a different note - I follow the instructions in your blog and created this project unfortunately it only deploys to the gh-pages branch. Is there a way to change that to master branch?

jnordberg commented 11 years ago

This is something i've been thinking about adding, mostly because i haven't found a deploy solution that i like for node.js. But i'm leaning towards making it a separate module right now, basically a rsync with pluggable transports. Although it would be cool to have wintersmith pipe the streams to e.g. amazon s3 without ever touching the disk :)

tlvince commented 11 years ago

With regards to Heroku, I'm currently using a small script that is called on npm install (previously, I was using a custom buildpack, which is a more longwinded version of the same thing). It might be an antipattern, but it works.

dashed commented 11 years ago

For reference, I posted my own solution to deploy to GitHub based on GitHub project pages: http://stackoverflow.com/a/18809325/412627

Can be easily adapted for Github user/org pages as well.

SimplGy commented 10 years ago

Mr. Cliff wrote a nice script to push your wintersmith build to a gh-pages repo: https://gist.github.com/christophercliff/4281358

kevinSuttle commented 10 years ago

Seems like something a grunt task could handle, yes?

dashed commented 10 years ago

This seems to be an open-ended issue as shown with many various solutions posted so far. Obviously there isn't a perfect solution as every hacker has their own deployment preference.

If you feel that no solution has fit your needs, feel free to hack your own; and hopefully share it with others.

I would suggest to close this issue and migrate all answers to a wiki.

jnordberg commented 10 years ago

Yeah i've started writing a node rsync like library/util with a transport protocol (so you can write plugins for s3 git etc). I've given up on the idea of having something like this included in wintersmith.

@Dashed that's a good idea, go ahead and do it if you feel like it :)

Leaving this open until we have the wiki page

SimplGy commented 10 years ago

Hopefully this isn't off topic, but anyone on a node platform isn't too far from grunt. grunt-aws-s3 task works incredibly well. It even does a compare and only uploads hashes that have changed. I have my wintersmith build wrapped in a grunt build and it works great, really!

jescalan commented 10 years ago

We're working on a package that will do exactly this called ship for a similar project. This will be polished up and ready in the next month or so if you guys wanted to integrate it as an option! It's already working for deploys to amazon s3, and heroku, dropbox, and github pages are very close.

jnordberg commented 10 years ago

Hey guys i've just finished nsync, a rsync clone for node with pluggable transport, i've been using it to deploy wintersmith builds to s3 and over ssh for a while and it works great

Eunoia commented 9 years ago

Thanks for your great suggestions, everyone.

This thread was the second result for "wintersmith deploy", and has become the canonical source for deployment.

Like many others, I created a way to deploy wintersmith. Use this gist, and gulp deploy to deploy wintersmith to s3.

gagan-bansal commented 9 years ago

I liked Stephan Hoyer idea to create a src directory in your github page project and build path as '../'

Do you see any issue with it?

gagan-bansal commented 9 years ago

Please do not take my above recommendation for Stephan Hoyer idea

A big issue in this structure "output": "../" if you run: wintersmith build --clean You are gone, whole project is wiped out. It happened with me and many of my changes had gone and the whole git project also.

OR please correct me If I am doing something wrong.